You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Garner, Shawn" <sh...@pearson.com> on 2005/12/22 01:10:51 UTC
[JSF/Shale] Controller returning null
I see examples of the controller method returning "success" or "error" type
situations which are mapped in the faces-config.xml file.
What happens if you return null from a controller method?
Does it return the previously rendered view or do you go to an error view
defined in a web.xml or something.
Shawn
****************************************************************************
This email may contain confidential material.
If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.
****************************************************************************
Re: [JSF/Shale] Controller returning null
Posted by Wendy Smoak <ws...@gmail.com>.
On 12/21/05, Alexandre Poitras <al...@gmail.com> wrote:
> I am not 100% sure but I think it does return the previously rendered view.
Correct. You can see an example in the code for the Shale Use Cases examples:
http://struts.apache.org/struts-shale/shale-usecases/xref/org/apache/shale/usecases/profile/LogonActions.html#223
At line 252, the logon method is returning null so that the same view
will be re-displayed with the error message.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [JSF/Shale] Controller returning null
Posted by Craig McClanahan <cr...@apache.org>.
On 12/21/05, Alexandre Poitras <al...@gmail.com> wrote:
>
> I am not 100% sure but I think it does return the previously rendered
> view.
>
> On 12/21/05, Garner, Shawn <sh...@pearson.com> wrote:
> >
> > I see examples of the controller method returning "success" or "error"
> > type
> > situations which are mapped in the faces-config.xml file.
> >
> > What happens if you return null from a controller method?
> >
Apologies if this is a repeat ... I can't see any evidence that the reply I
*thought* I sent to this question actually got sent.
The precise behavior in this case is up to the NavigationHandler instance
being used, but the behavior for the *default* NavigationHandler instance is
specified (see Section 7.4.2 of the JSF Specification). A null return
indicates that the current view should be rerendered, as Alexandre states
above.
Craig
Re: [JSF/Shale] Controller returning null
Posted by Alexandre Poitras <al...@gmail.com>.
I am not 100% sure but I think it does return the previously rendered view.
On 12/21/05, Garner, Shawn <sh...@pearson.com> wrote:
>
> I see examples of the controller method returning "success" or "error"
> type
> situations which are mapped in the faces-config.xml file.
>
> What happens if you return null from a controller method?
>
> Does it return the previously rendered view or do you go to an error view
> defined in a web.xml or something.
>
>
>
> Shawn
>
>
>
>
>
> ****************************************************************************
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>
> ****************************************************************************
>
>
--
Alexandre Poitras
Québec, Canada