You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Enrique Medina Montenegro (JIRA)" <my...@incubator.apache.org> on 2005/08/08 15:21:37 UTC

[jira] Updated: (MYFACES-403) Use a PhaseListener to reinject FacesMessages lost during a redirection to the JSF context

     [ http://issues.apache.org/jira/browse/MYFACES-403?page=all ]

Enrique Medina Montenegro updated MYFACES-403:
----------------------------------------------

    Attachment: FacesMessageListener.java

This listener must be extended in order to provide the mechanisms to get and set the list of messages from a temporary storage, e.g. the HttpSession

Then it has to be registered in the faces-config.xml file:

	<lifecycle>
		<phase-listener>
			com.deltar.taller.web.bean.FacesMessageListener
		</phase-listener>
	</lifecycle>


> Use a PhaseListener to reinject FacesMessages lost during a redirection to the JSF context
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-403
>          URL: http://issues.apache.org/jira/browse/MYFACES-403
>      Project: MyFaces
>         Type: Improvement
>   Components: General
>  Environment: N/A
>     Reporter: Enrique Medina Montenegro
>     Priority: Trivial
>  Attachments: FacesMessageListener.java
>
> When using redirection to navigate from one JSF view to another, e.g., to implement the PRG (Post-Redirect-Get) pattern, all the FacesMessage objects are lost, so the destination view is not able to show any messages created from the originating view.
> The idea is to temporarily save a copy of the messages in a storage that will survive to the redirection, and then reinject those messages to the JSF context before rendering the destination view.
> Attached I have provided with a simple but effective way to achieve this behaviour.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira