myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Lessard" <simon.lessar...@gmail.com>
Subject Re: FacesContext.addMessage in an action method
Date Sun, 18 Mar 2007 23:42:22 GMT
Yes, returning null reloads the same page.

On 3/18/07, SOSELLA@austin.rr.com <SOSELLA@austin.rr.com> wrote:
>
> Simon,
>
> Yes.  I am using <redirect /> in my navigation rules.  What is the
> behavior of JSF if you return null?  Does it stay on that page?
>
> Thanks for the tip.  This might be the explanation I have been seeking.
>
>
> ----- Original Message -----
> From: Simon Kitching <simon.kitching@rhe.co.nz>
> Date: Sunday, March 18, 2007 3:48 pm
> Subject: Re: FacesContext.addMessage in an action method
> To: MyFaces Discussion <users@myfaces.apache.org>
>
> >
> > Adding error messages from action methods works fine for me.
> >
> > And they certainly should show up, even if you don't provide a
> > component
> > or client-id (these are optional parameters).
> >
> > Are you perhaps returning a navigation string from your action
> > method
> > and then using <redirect/> in your navigation rules? This would
> > definitely discard any registered messages...
> >
> > I suggest returning NULL from your action method if you are
> > reporting
> > any errors.
> >
> > Regards,
> >
> > Simon
> >
>

Mime
View raw message