You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by "Arnold, Michael" <mi...@hp.com> on 2005/06/17 20:16:35 UTC
PageFlows and FacesMessage
I'm having trouble displaying messages in a JSF view when using
PageFlows.
With the typical JSF application, I can put messages into FacesContext
that will then be displayed using the <h:messages/> tag. This seems to
work with PageFlows when I do validation or conversion functions that
don't raise PageFlow actions. However, if I do execute a backing bean
event handler that raises actions, if the action fails and I want to
redisplay the page, the message I add into FacesContext isn't displayed.
For example, I have a login form that raises an action in the associated
PageFlow controller. If the login is incorrect, the action returns a
forward indicating failure. The forward includes an action output that
is a simple String containing an error message. In the onCreate()
method of my backing bean, I call getPageInput(), get the message, and
set a new FacesMessage into the current instance of the FacesContext.
Any insight into this is greatly appreciated.
Thanks,
Mike Arnold
Re: PageFlows and FacesMessage
Posted by Rich Feit <ri...@gmail.com>.
Hi Mike,
Just to make sure I understand... if you add code in onCreate() to add a
FacesMessage into the FacesContext, then hit the page directly (without
going through a Page Flow action), do you see the same problem? If not,
would you file a bug with a repro case in it? I can take a look.
Also, to confirm, are you getting the correct value from getPageInput()
in your onCreate()?
Thanks,
Rich
Arnold, Michael wrote:
>I'm having trouble displaying messages in a JSF view when using
>PageFlows.
>
>With the typical JSF application, I can put messages into FacesContext
>that will then be displayed using the <h:messages/> tag. This seems to
>work with PageFlows when I do validation or conversion functions that
>don't raise PageFlow actions. However, if I do execute a backing bean
>event handler that raises actions, if the action fails and I want to
>redisplay the page, the message I add into FacesContext isn't displayed.
>
>For example, I have a login form that raises an action in the associated
>PageFlow controller. If the login is incorrect, the action returns a
>forward indicating failure. The forward includes an action output that
>is a simple String containing an error message. In the onCreate()
>method of my backing bean, I call getPageInput(), get the message, and
>set a new FacesMessage into the current instance of the FacesContext.
>
>Any insight into this is greatly appreciated.
>
>Thanks,
>Mike Arnold
>
>
>