Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

showing facesMessages on xhtml

 
Matt Couto
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic