consider "_rendered" property while reconstructing facesMess

UI Components for JSF
Post Reply
eWMS
Posts: 90
Joined: 22 Jun 2011, 11:20

14 Jul 2011, 17:05

Hi,

Our requirement is to remove few facesMessage from FacesContext before rendering it using <p:messages/>.
We tried setting the "_rendered" property to "true" , so that it would not be rendered.
But, in "MessagesRenderer" class while encodeEnd() "context.getMessages()" returns the List of facesMessages which where newly created.
Hence, whatever we update the facesMessages before was being lost.

I think, "context.getMessages()" should return the objects already present in the facesContext or else should consider the "_rendered" property
while constructing the new facesMessage object.


Can you please help me here.

Thanks in advance!

Environment:
Primefaces 3.0.M2
JSF v2.1.1 with MyFaces Implementation
SWF v2.3.0.RELEASE

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

15 Jul 2011, 08:34

context.getMessages() is not PrimeFaces as it is how core JSF works.

"Our requirement is to remove few facesMessage from FacesContext before rendering it using <p:messages/>."
Why would you need such a case.

eWMS
Posts: 90
Joined: 22 Jun 2011, 11:20

15 Jul 2011, 09:26

Yes, <p:messages/> works fine, so does the other primefaces components used in this scenario...
Now, I can see, "FlowFacesContextMessageDelegate" class of SWF where FacesMessage are constructed (or rather constructed).
Will try to look into other approach.

Thanks For Your Support!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 62 guests