• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF RichFaces Facelets integration problem

 
Tudor Raneti
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a form inside <ui:define name=%2526quot%253Bcontent%2526quot%253B%2526gt%253B%252C which after authenticating as admin:admin is just setting a boolean that another RichFaces control checks in its rendered attribute. The problem is that after it does, all that appears in the page is:

instead of the RichFaces control.

If I refresh the page, the control happily appears. If i refresh again the control remains and dissapears

This seems that Facelets doesn't integrate well with Ajax requests because when is switch to h:form and h:commandButton it works as espected. What should i do to make it work with Ajax?

The page is:



EDIT:
lifecycle insight:
10:12:29,318 INFO [STDOUT] START PHASE RESTORE_VIEW 1
10:12:29,334 INFO [STDOUT] END PHASE RESTORE_VIEW 1
10:12:29,334 INFO [STDOUT] START PHASE APPLY_REQUEST_VALUES 2
10:12:29,334 INFO [STDOUT] is in admins
10:12:29,334 INFO [STDOUT] END PHASE APPLY_REQUEST_VALUES 2
10:12:29,334 INFO [STDOUT] START PHASE PROCESS_VALIDATIONS 3
10:12:29,334 INFO [STDOUT] is in admins
10:12:29,334 INFO [STDOUT] END PHASE PROCESS_VALIDATIONS 3
10:12:29,334 INFO [STDOUT] START PHASE UPDATE_MODEL_VALUES 4
10:12:29,334 INFO [STDOUT] is in admins
10:12:29,334 INFO [STDOUT] END PHASE UPDATE_MODEL_VALUES 4
10:12:29,334 INFO [STDOUT] START PHASE INVOKE_APPLICATION 5
10:12:29,334 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
10:12:29,334 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
10:12:29,381 INFO [STDOUT] Hibernate: select users0_.id as id16_, users0_.aisle as aisle16_, users0_.password as password16_, users0_.username as username16_ from USERS users0_ where users0_.username=%3F and users0_.password=?
10:12:29,474 INFO [STDOUT] is in login
10:12:29,474 INFO [STDOUT] END PHASE INVOKE_APPLICATION 5
10:12:29,474 INFO [STDOUT] START PHASE RENDER_RESPONSE 6
10:12:29,474 INFO [STDOUT] is in admins
10:12:29,474 INFO [STDOUT] is in admins
10:12:29,474 INFO [STDOUT] is in admins
10:12:29,474 INFO [STDOUT] is in admins
10:12:29,474 INFO [STDOUT] is in admins
10:12:29,490 INFO [STDOUT] is in admins
10:12:29,490 INFO [STDOUT] is in admins
10:12:29,490 INFO [STDOUT] END PHASE RENDER_RESPONSE 6
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Facelets works VERY well with AJAX, and especially when using the RichFaces/a4j tagset. I've tons of apps that take advantage of that.

You shouldn't need a4j:form anymore. It originally provided functionality that couldn't be made automatic with h:form, but in most cases, h:form will now suffice.

There's so many trees in your example that I can't see the forest, but I suspect that you're actually trying to micro-manage functionalities that are quite capable of operating themselves at a higher level and thereby falling afoul of the minutiae, but that's just a guess. On the other hand, I do recommend you lose all the explicit raw HTML, since JSF has its own layout capabilities that are just as usable. And I'll keep silent on the whole concept of apps with their own built-in login code, since that sort of thing tends to send me off on tirades.
 
Tudor Raneti
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, nothing to do with Facelets. Solved HERE

P.S. Sorry about all the HTML. It was a time saving copy paste for quick format
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic