This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes JSF and the fly likes showing facesMessages on xhtml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "showing facesMessages on xhtml" Watch "showing facesMessages on xhtml" New topic

showing facesMessages on xhtml

Matt Couto
Ranch Hand

Joined: Jul 10, 2009
Posts: 38
Is there a way to show the facesMessages on the xhtml page by using <rich:messages> "only" if on my link/button is a reRender property with the id's panel where contains that rich:messages component?? At the moment it always shows the message even though there is no reRender property...
any clue?
Akaine Harga
Ranch Hand

Joined: Nov 03, 2009
Posts: 97

Use rendered attribute (ie <rich:messages rendered="#{bean.flag}" />) setting the flag. You would need to rerender the part containing the rich:messages element with rerender to take effect before showing messages of course.

To avoid loosing the errors if rerender is called too late print them on oncomplete event of the action (oncomplete attribute of link/button)

Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
willCodeForFood("Java,PHP,C#,XML,VBS,XHTML,CSS,JavaScript,SQL"); //always looking for job opportunities in AU/NZ/US/CA/Europe :P
I agree. Here's the link:
subject: showing facesMessages on xhtml
jQuery in Action, 3rd edition