You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dustin Bruzenak (JIRA)" <de...@myfaces.apache.org> on 2006/01/10 17:43:20 UTC

[jira] Created: (MYFACES-1018) PhaseListener That Persists Messages After Redirects

PhaseListener That Persists Messages After Redirects
----------------------------------------------------

         Key: MYFACES-1018
         URL: http://issues.apache.org/jira/browse/MYFACES-1018
     Project: MyFaces
        Type: New Feature
  Components: General  
    Reporter: Dustin Bruzenak


Currently when JSFMessages are added to the FacesContext those messages are lost  when a redirect is issued. This is a problem for a handler that does some validation that adds messages and then returns a navigation case that has a redirect.

A PhaseListener can be written that will persist the current JSFMessages in the user's session and then reloads them into the FacesContext on the next request. Since the application will almost never want to add messages to the context and have them immediately be lost, the presence of this listener would help ensure that the message manager matches the expected result.

-- 
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


[jira] Commented: (MYFACES-1018) PhaseListener That Persists Messages After Redirects

Posted by "Dustin Bruzenak (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1018?page=comments#action_12362353 ] 

Dustin Bruzenak commented on MYFACES-1018:
------------------------------------------

Sorry, I misread your previous statement. Putting a fix into the NavigationHandler (ala MYFACES-516) is a much better solution than the PhaseListener approach. :)

> PhaseListener That Persists Messages After Redirects
> ----------------------------------------------------
>
>          Key: MYFACES-1018
>          URL: http://issues.apache.org/jira/browse/MYFACES-1018
>      Project: MyFaces
>         Type: New Feature
>   Components: General
>     Reporter: Dustin Bruzenak
>  Attachments: JsfMessagePhaseListener.txt
>
> Currently when JSFMessages are added to the FacesContext those messages are lost  when a redirect is issued. This is a problem for a handler that does some validation that adds messages and then returns a navigation case that has a redirect.
> A PhaseListener can be written that will persist the current JSFMessages in the user's session and then reloads them into the FacesContext on the next request. Since the application will almost never want to add messages to the context and have them immediately be lost, the presence of this listener would help ensure that the message manager matches the expected result.

-- 
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


[jira] Commented: (MYFACES-1018) PhaseListener That Persists Messages After Redirects

Posted by "Dustin Bruzenak (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1018?page=comments#action_12362340 ] 

Dustin Bruzenak commented on MYFACES-1018:
------------------------------------------

Sorry about the priority. This should be modded down to a minor priority.

> PhaseListener That Persists Messages After Redirects
> ----------------------------------------------------
>
>          Key: MYFACES-1018
>          URL: http://issues.apache.org/jira/browse/MYFACES-1018
>      Project: MyFaces
>         Type: New Feature
>   Components: General
>     Reporter: Dustin Bruzenak
>  Attachments: JsfMessagePhaseListener.txt
>
> Currently when JSFMessages are added to the FacesContext those messages are lost  when a redirect is issued. This is a problem for a handler that does some validation that adds messages and then returns a navigation case that has a redirect.
> A PhaseListener can be written that will persist the current JSFMessages in the user's session and then reloads them into the FacesContext on the next request. Since the application will almost never want to add messages to the context and have them immediately be lost, the presence of this listener would help ensure that the message manager matches the expected result.

-- 
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


[jira] Commented: (MYFACES-1018) PhaseListener That Persists Messages After Redirects

Posted by "Dustin Bruzenak (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1018?page=comments#action_12362349 ] 

Dustin Bruzenak commented on MYFACES-1018:
------------------------------------------

No problem. This is a solution to an issue we had internally that I figured I'd post for group discussion. 

I agree that this is a application implementation concern as opposed to something that should be included in the 'core' JSF implementation. I think that if the phase ordering issues get resolved putting something like this in a PhaseListener makes sense from the perspective that the JSF messaging is a JSF specific task and so should have a JSF specific solution. Where to put it, on the other hand, is purely a packaging concerned and I'm not familiar enough with the project to make that choice/suggestion.

> PhaseListener That Persists Messages After Redirects
> ----------------------------------------------------
>
>          Key: MYFACES-1018
>          URL: http://issues.apache.org/jira/browse/MYFACES-1018
>      Project: MyFaces
>         Type: New Feature
>   Components: General
>     Reporter: Dustin Bruzenak
>  Attachments: JsfMessagePhaseListener.txt
>
> Currently when JSFMessages are added to the FacesContext those messages are lost  when a redirect is issued. This is a problem for a handler that does some validation that adds messages and then returns a navigation case that has a redirect.
> A PhaseListener can be written that will persist the current JSFMessages in the user's session and then reloads them into the FacesContext on the next request. Since the application will almost never want to add messages to the context and have them immediately be lost, the presence of this listener would help ensure that the message manager matches the expected result.

-- 
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


[jira] Closed: (MYFACES-1018) PhaseListener That Persists Messages After Redirects

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1018?page=all ]
     
Mike Kienenberger closed MYFACES-1018:
--------------------------------------

    Resolution: Duplicate

Let's keep this in MYFACES-516.

I'd rather not see a phase-listener solution since there are ordering issues with phase-listener execution.

MYFACES-516 has a non-phase-listener solution proposed.

> PhaseListener That Persists Messages After Redirects
> ----------------------------------------------------
>
>          Key: MYFACES-1018
>          URL: http://issues.apache.org/jira/browse/MYFACES-1018
>      Project: MyFaces
>         Type: New Feature
>   Components: General
>     Reporter: Dustin Bruzenak
>  Attachments: JsfMessagePhaseListener.txt
>
> Currently when JSFMessages are added to the FacesContext those messages are lost  when a redirect is issued. This is a problem for a handler that does some validation that adds messages and then returns a navigation case that has a redirect.
> A PhaseListener can be written that will persist the current JSFMessages in the user's session and then reloads them into the FacesContext on the next request. Since the application will almost never want to add messages to the context and have them immediately be lost, the presence of this listener would help ensure that the message manager matches the expected result.

-- 
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


[jira] Commented: (MYFACES-1018) PhaseListener That Persists Messages After Redirects

Posted by "Dennis Byrne (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1018?page=comments#action_12362341 ] 

Dennis Byrne commented on MYFACES-1018:
---------------------------------------

This is a duplicate of http://issues.apache.org/jira/browse/MYFACES-403 .

> PhaseListener That Persists Messages After Redirects
> ----------------------------------------------------
>
>          Key: MYFACES-1018
>          URL: http://issues.apache.org/jira/browse/MYFACES-1018
>      Project: MyFaces
>         Type: New Feature
>   Components: General
>     Reporter: Dustin Bruzenak
>  Attachments: JsfMessagePhaseListener.txt
>
> Currently when JSFMessages are added to the FacesContext those messages are lost  when a redirect is issued. This is a problem for a handler that does some validation that adds messages and then returns a navigation case that has a redirect.
> A PhaseListener can be written that will persist the current JSFMessages in the user's session and then reloads them into the FacesContext on the next request. Since the application will almost never want to add messages to the context and have them immediately be lost, the presence of this listener would help ensure that the message manager matches the expected result.

-- 
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


[jira] Updated: (MYFACES-1018) PhaseListener That Persists Messages After Redirects

Posted by "Dustin Bruzenak (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1018?page=all ]

Dustin Bruzenak updated MYFACES-1018:
-------------------------------------

    Attachment: JsfMessagePhaseListener.txt

This is my first crack at the PhaseListener mentioned above. Feel free to use, modify, or tell me to fix it if something looks broken.

> PhaseListener That Persists Messages After Redirects
> ----------------------------------------------------
>
>          Key: MYFACES-1018
>          URL: http://issues.apache.org/jira/browse/MYFACES-1018
>      Project: MyFaces
>         Type: New Feature
>   Components: General
>     Reporter: Dustin Bruzenak
>  Attachments: JsfMessagePhaseListener.txt
>
> Currently when JSFMessages are added to the FacesContext those messages are lost  when a redirect is issued. This is a problem for a handler that does some validation that adds messages and then returns a navigation case that has a redirect.
> A PhaseListener can be written that will persist the current JSFMessages in the user's session and then reloads them into the FacesContext on the next request. Since the application will almost never want to add messages to the context and have them immediately be lost, the presence of this listener would help ensure that the message manager matches the expected result.

-- 
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