[ http://jira.andromda.org/browse/JSF-19?page=comments#action_13050 ] 

Samuel Solon commented on JSF-19:
---------------------------------

I have been developing using 3.2-SNAPSHOT and the patch was made to CVS branch 
V3_x_HEAD downloaded in the last 24 hours.

> addXXXMessages don't survive across redirect
> --------------------------------------------
>
>          Key: JSF-19
>          URL: http://jira.andromda.org/browse/JSF-19
>      Project: JSF cartridge
>         Type: Bug

>     Reporter: Samuel Solon
>     Assignee: Chad Brandon

>
> Messages added using the addXXXMessage method of a controller class don't 
> survive a redirect and it appears that most (all?) navigation is done using 
> redirects.
> Although my knowledge of JSF is very limited it seems that this can be made 
> to work by moving the messages from the form to the FacesContext before 
> rendering so it will happen on the other side of the redirect.
> Limited testing has shown that such an approach will cause the messages to be 
> displayed but I am not sure how this approach will fit in with the 
> lifecycle(s) of the various objects.
> ===================================================================
> RCS file: 
> /cvsroot/andromda/cartridges/andromda-jsf/src/templates/jsf/utils/Attic/MessagePhaseListener.java.vsl,v
> retrieving revision 1.1.2.2
> diff -u -r1.1.2.2 MessagePhaseListener.java.vsl --- 
> cartridges/andromda-jsf/src/templates/jsf/utils/MessagePhaseListener.java.vsl
> 3 Jun 2006 16:59:25 -0000       1.1.2.2 +++ 
> cartridges/andromda-jsf/src/templates/jsf/utils/MessagePhaseListener.java.vsl
> 22 Jul 2006 21:25:00 -0000 @@ -17,7 +17,7 @@
>       */
>      public void beforePhase(javax.faces.event.PhaseEvent event)
>      {
> -        // - don't need this implemented
> +        moveMessages();
>      } 
>      /** @@ -25,6 +25,12 @@
>       */      public void afterPhase(javax.faces.event.PhaseEvent event)
>      {
> +        // - don't need this implemented
> +    }
> +
> +    private void moveMessages()
> +    {
> +
>          final Object form = 
> oracle.adf.view.faces.context.AdfFacesContext.getCurrentInstance().getProcessScope().get("$actionFormKey");
>          if (form != null)
>          {
> @@ -51,6 +57,6 @@
>       */
>      public javax.faces.event.PhaseId getPhaseId()
>      {
> -        return javax.faces.event.PhaseId.INVOKE_APPLICATION;
> +        return javax.faces.event.PhaseId.RENDER_RESPONSE;
>      }
>  }
> \ No newline at end of file

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


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Reply via email to