This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF RichFaces Facelets integration problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF RichFaces Facelets integration problem" Watch "JSF RichFaces Facelets integration problem" New topic
Author

JSF RichFaces Facelets integration problem

Tudor Raneti
Ranch Hand

Joined: Nov 29, 2009
Posts: 145
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

Joined: Jun 25, 2001
Posts: 15959
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Tudor Raneti
Ranch Hand

Joined: Nov 29, 2009
Posts: 145
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF RichFaces Facelets integration problem
 
Similar Threads
JSF - Missing source code using templating and composition
validating a form being submitted by 2 actions
Multipart request problem
Can not Populate the form on combo box change
Session Synchronization Problem in JSF