Invoking FacesNavigation from a Filter

View: New views
20 Messages — Rating Filter:   Alert me  

Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm trying to invoke default FacesNavigation from a filter (Where I've
already instantiated a FacesContext,) but I can't seem to get it to
work unless the outcome was defined in a navigation case in
faces-config.xml.

When the navigation case is a direct navigation (/faces/demo.jsf) or a
relative navigation string (eg: demo.jsf), no navigation occurs.

I'm assuming this has to do with the fact that the view was not
restored and set into the context, but doing that manually with a
viewId of "" to prevent NullPointerException doesn't work either.

Thoughts? How can I properly build the facesContext object model to
support navigation in a filter?

Thanks,
Lincoln

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


RE: Invoking FacesNavigation from a Filter

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Why would you want to use a Filter. Have you considered using
a PhaseListener instead?

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Saturday, October 31, 2009 1:12 PM
To: dev@...
Subject: Invoking FacesNavigation from a Filter

Hi,

I'm trying to invoke default FacesNavigation from a filter (Where I've
already instantiated a FacesContext,) but I can't seem to get it to
work unless the outcome was defined in a navigation case in
faces-config.xml.

When the navigation case is a direct navigation (/faces/demo.jsf) or a
relative navigation string (eg: demo.jsf), no navigation occurs.

I'm assuming this has to do with the fact that the view was not
restored and set into the context, but doing that manually with a
viewId of "" to prevent NullPointerException doesn't work either.

Thoughts? How can I properly build the facesContext object model to
support navigation in a filter?

Thanks,
Lincoln

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's the same problem with a PhaseListener. If I am attempting to
invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
find the outcome:

"Unable to find matching navigation case from view ID '' for outcome
'/faces/validation/target.jsf' "

If I invoke navigation *after* RESTORE_VIEW phase, it resolves successfully.

Perhaps this is just a bug? I feel like I should be able to invoke
navigation, if not in a filter, at least in a PhaseListener before
RESTORE_VIEW.


--Lincoln

On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...> wrote:

> Why would you want to use a Filter. Have you considered using
> a PhaseListener instead?
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Saturday, October 31, 2009 1:12 PM
> To: dev@...
> Subject: Invoking FacesNavigation from a Filter
>
> Hi,
>
> I'm trying to invoke default FacesNavigation from a filter (Where I've
> already instantiated a FacesContext,) but I can't seem to get it to
> work unless the outcome was defined in a navigation case in
> faces-config.xml.
>
> When the navigation case is a direct navigation (/faces/demo.jsf) or a
> relative navigation string (eg: demo.jsf), no navigation occurs.
>
> I'm assuming this has to do with the fact that the view was not
> restored and set into the context, but doing that manually with a
> viewId of "" to prevent NullPointerException doesn't work either.
>
> Thoughts? How can I properly build the facesContext object model to
> support navigation in a filter?
>
> Thanks,
> Lincoln
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by Kito Mann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Lincoln,

I don't think the viewId is set on the FacesContext until after RESTORE_VIEW. It might work if you just manually call facesContext.setViewId("/mypage.jsp").
---
Kito D. Mann | twitter: kito99 | Author, JSF in Action
Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral
+1 203-404-4848 x3

JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com



On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III <lincolnbaxter@...> wrote:
It's the same problem with a PhaseListener. If I am attempting to
invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
find the outcome:

"Unable to find matching navigation case from view ID '' for outcome
'/faces/validation/target.jsf' "

If I invoke navigation *after* RESTORE_VIEW phase, it resolves successfully.

Perhaps this is just a bug? I feel like I should be able to invoke
navigation, if not in a filter, at least in a PhaseListener before
RESTORE_VIEW.


--Lincoln

On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...> wrote:
> Why would you want to use a Filter. Have you considered using
> a PhaseListener instead?
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Saturday, October 31, 2009 1:12 PM
> To: dev@...
> Subject: Invoking FacesNavigation from a Filter
>
> Hi,
>
> I'm trying to invoke default FacesNavigation from a filter (Where I've
> already instantiated a FacesContext,) but I can't seem to get it to
> work unless the outcome was defined in a navigation case in
> faces-config.xml.
>
> When the navigation case is a direct navigation (/faces/demo.jsf) or a
> relative navigation string (eg: demo.jsf), no navigation occurs.
>
> I'm assuming this has to do with the fact that the view was not
> restored and set into the context, but doing that manually with a
> viewId of "" to prevent NullPointerException doesn't work either.
>
> Thoughts? How can I properly build the facesContext object model to
> support navigation in a filter?
>
> Thanks,
> Lincoln
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.

On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:

> Hello Lincoln,
>
> I don't think the viewId is set on the FacesContext until after
> RESTORE_VIEW. It might work if you just manually call
> facesContext.setViewId("/mypage.jsp").
> ---
> Kito D. Mann | twitter: kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter:
> jsfcentral
> +1 203-404-4848 x3
>
> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>
>
>
> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
> <lincolnbaxter@...> wrote:
>>
>> It's the same problem with a PhaseListener. If I am attempting to
>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>> find the outcome:
>>
>> "Unable to find matching navigation case from view ID '' for outcome
>> '/faces/validation/target.jsf' "
>>
>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>> successfully.
>>
>> Perhaps this is just a bug? I feel like I should be able to invoke
>> navigation, if not in a filter, at least in a PhaseListener before
>> RESTORE_VIEW.
>>
>>
>> --Lincoln
>>
>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...> wrote:
>> > Why would you want to use a Filter. Have you considered using
>> > a PhaseListener instead?
>> >
>> > Manfred
>> >
>> > -----Original Message-----
>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> > Sent: Saturday, October 31, 2009 1:12 PM
>> > To: dev@...
>> > Subject: Invoking FacesNavigation from a Filter
>> >
>> > Hi,
>> >
>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>> > already instantiated a FacesContext,) but I can't seem to get it to
>> > work unless the outcome was defined in a navigation case in
>> > faces-config.xml.
>> >
>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>> >
>> > I'm assuming this has to do with the fact that the view was not
>> > restored and set into the context, but doing that manually with a
>> > viewId of "" to prevent NullPointerException doesn't work either.
>> >
>> > Thoughts? How can I properly build the facesContext object model to
>> > support navigation in a filter?
>> >
>> > Thanks,
>> > Lincoln
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


RE: Invoking FacesNavigation from a Filter

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Which version of JSF are you trying it on?

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Saturday, October 31, 2009 3:39 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.

On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
> Hello Lincoln,
>
> I don't think the viewId is set on the FacesContext until after
> RESTORE_VIEW. It might work if you just manually call
> facesContext.setViewId("/mypage.jsp").
> ---
> Kito D. Mann | twitter: kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
twitter:

> jsfcentral
> +1 203-404-4848 x3
>
> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>
>
>
> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
> <lincolnbaxter@...> wrote:
>>
>> It's the same problem with a PhaseListener. If I am attempting to
>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>> find the outcome:
>>
>> "Unable to find matching navigation case from view ID '' for outcome
>> '/faces/validation/target.jsf' "
>>
>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>> successfully.
>>
>> Perhaps this is just a bug? I feel like I should be able to invoke
>> navigation, if not in a filter, at least in a PhaseListener before
>> RESTORE_VIEW.
>>
>>
>> --Lincoln
>>
>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
wrote:

>> > Why would you want to use a Filter. Have you considered using
>> > a PhaseListener instead?
>> >
>> > Manfred
>> >
>> > -----Original Message-----
>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> > Sent: Saturday, October 31, 2009 1:12 PM
>> > To: dev@...
>> > Subject: Invoking FacesNavigation from a Filter
>> >
>> > Hi,
>> >
>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>> > already instantiated a FacesContext,) but I can't seem to get it to
>> > work unless the outcome was defined in a navigation case in
>> > faces-config.xml.
>> >
>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>> >
>> > I'm assuming this has to do with the fact that the view was not
>> > restored and set into the context, but doing that manually with a
>> > viewId of "" to prevent NullPointerException doesn't work either.
>> >
>> > Thoughts? How can I properly build the facesContext object model to
>> > support navigation in a filter?
>> >
>> > Thanks,
>> > Lincoln
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2.0.1
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Manfred Riem" <mriem@...>
Date: Sat, 31 Oct 2009 20:34:29
To: <dev@...>
Subject:  RE: Invoking FacesNavigation from a Filter
Which version of JSF are you trying it on?

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Saturday, October 31, 2009 3:39 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.

On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
> Hello Lincoln,
>
> I don't think the viewId is set on the FacesContext until after
> RESTORE_VIEW. It might work if you just manually call
> facesContext.setViewId("/mypage.jsp").
> ---
> Kito D. Mann | twitter: kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
twitter:

> jsfcentral
> +1 203-404-4848 x3
>
> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>
>
>
> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
> <lincolnbaxter@...> wrote:
>>
>> It's the same problem with a PhaseListener. If I am attempting to
>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>> find the outcome:
>>
>> "Unable to find matching navigation case from view ID '' for outcome
>> '/faces/validation/target.jsf' "
>>
>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>> successfully.
>>
>> Perhaps this is just a bug? I feel like I should be able to invoke
>> navigation, if not in a filter, at least in a PhaseListener before
>> RESTORE_VIEW.
>>
>>
>> --Lincoln
>>
>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
wrote:

>> > Why would you want to use a Filter. Have you considered using
>> > a PhaseListener instead?
>> >
>> > Manfred
>> >
>> > -----Original Message-----
>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> > Sent: Saturday, October 31, 2009 1:12 PM
>> > To: dev@...
>> > Subject: Invoking FacesNavigation from a Filter
>> >
>> > Hi,
>> >
>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>> > already instantiated a FacesContext,) but I can't seem to get it to
>> > work unless the outcome was defined in a navigation case in
>> > faces-config.xml.
>> >
>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>> >
>> > I'm assuming this has to do with the fact that the view was not
>> > restored and set into the context, but doing that manually with a
>> > viewId of "" to prevent NullPointerException doesn't work either.
>> >
>> > Thoughts? How can I properly build the facesContext object model to
>> > support navigation in a filter?
>> >
>> > Thanks,
>> > Lincoln
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


RE: Invoking FacesNavigation from a Filter

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there any reason why you can just dispatch using the actual jsp/xhtml
page?

Manfred

-----Original Message-----
From: lincolnbaxter@... [mailto:lincolnbaxter@...]
Sent: Saturday, October 31, 2009 10:51 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

2.0.1
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Manfred Riem" <mriem@...>
Date: Sat, 31 Oct 2009 20:34:29
To: <dev@...>
Subject:  RE: Invoking FacesNavigation from a Filter
Which version of JSF are you trying it on?

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Saturday, October 31, 2009 3:39 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.

On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
> Hello Lincoln,
>
> I don't think the viewId is set on the FacesContext until after
> RESTORE_VIEW. It might work if you just manually call
> facesContext.setViewId("/mypage.jsp").
> ---
> Kito D. Mann | twitter: kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
twitter:

> jsfcentral
> +1 203-404-4848 x3
>
> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>
>
>
> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
> <lincolnbaxter@...> wrote:
>>
>> It's the same problem with a PhaseListener. If I am attempting to
>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>> find the outcome:
>>
>> "Unable to find matching navigation case from view ID '' for outcome
>> '/faces/validation/target.jsf' "
>>
>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>> successfully.
>>
>> Perhaps this is just a bug? I feel like I should be able to invoke
>> navigation, if not in a filter, at least in a PhaseListener before
>> RESTORE_VIEW.
>>
>>
>> --Lincoln
>>
>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
wrote:

>> > Why would you want to use a Filter. Have you considered using
>> > a PhaseListener instead?
>> >
>> > Manfred
>> >
>> > -----Original Message-----
>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> > Sent: Saturday, October 31, 2009 1:12 PM
>> > To: dev@...
>> > Subject: Invoking FacesNavigation from a Filter
>> >
>> > Hi,
>> >
>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>> > already instantiated a FacesContext,) but I can't seem to get it to
>> > work unless the outcome was defined in a navigation case in
>> > faces-config.xml.
>> >
>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>> >
>> > I'm assuming this has to do with the fact that the view was not
>> > restored and set into the context, but doing that manually with a
>> > viewId of "" to prevent NullPointerException doesn't work either.
>> >
>> > Thoughts? How can I properly build the facesContext object model to
>> > support navigation in a filter?
>> >
>> > Thanks,
>> > Lincoln
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by Kito Mann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Lincoln,

I wonder if this behavior has changed since JSF 1.x; I'm pretty sure that'd work with 1.x.
---
Kito D. Mann | twitter: kito99 | Author, JSF in Action
Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral
+1 203-404-4848 x3

JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com



On Sat, Oct 31, 2009 at 11:51 PM, <lincolnbaxter@...> wrote:
2.0.1
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Manfred Riem" <mriem@...>
Date: Sat, 31 Oct 2009 20:34:29
To: <dev@...>
Subject:  RE: Invoking FacesNavigation from a Filter
Which version of JSF are you trying it on?

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Saturday, October 31, 2009 3:39 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.

On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
> Hello Lincoln,
>
> I don't think the viewId is set on the FacesContext until after
> RESTORE_VIEW. It might work if you just manually call
> facesContext.setViewId("/mypage.jsp").
> ---
> Kito D. Mann | twitter: kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
twitter:
> jsfcentral
> +1 203-404-4848 x3
>
> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>
>
>
> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
> <lincolnbaxter@...> wrote:
>>
>> It's the same problem with a PhaseListener. If I am attempting to
>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>> find the outcome:
>>
>> "Unable to find matching navigation case from view ID '' for outcome
>> '/faces/validation/target.jsf' "
>>
>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>> successfully.
>>
>> Perhaps this is just a bug? I feel like I should be able to invoke
>> navigation, if not in a filter, at least in a PhaseListener before
>> RESTORE_VIEW.
>>
>>
>> --Lincoln
>>
>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
wrote:
>> > Why would you want to use a Filter. Have you considered using
>> > a PhaseListener instead?
>> >
>> > Manfred
>> >
>> > -----Original Message-----
>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> > Sent: Saturday, October 31, 2009 1:12 PM
>> > To: dev@...
>> > Subject: Invoking FacesNavigation from a Filter
>> >
>> > Hi,
>> >
>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>> > already instantiated a FacesContext,) but I can't seem to get it to
>> > work unless the outcome was defined in a navigation case in
>> > faces-config.xml.
>> >
>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>> >
>> > I'm assuming this has to do with the fact that the view was not
>> > restored and set into the context, but doing that manually with a
>> > viewId of "" to prevent NullPointerException doesn't work either.
>> >
>> > Thoughts? How can I properly build the facesContext object model to
>> > support navigation in a filter?
>> >
>> > Thanks,
>> > Lincoln
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That would work, but then you incur the cost of RESTORE_VIEW phase
every time you do a navigation.

On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:

> Is there any reason why you can just dispatch using the actual jsp/xhtml
> page?
>
> Manfred
>
> -----Original Message-----
> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
> Sent: Saturday, October 31, 2009 10:51 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> 2.0.1
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: "Manfred Riem" <mriem@...>
> Date: Sat, 31 Oct 2009 20:34:29
> To: <dev@...>
> Subject:  RE: Invoking FacesNavigation from a Filter
> Which version of JSF are you trying it on?
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Saturday, October 31, 2009 3:39 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>
> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>> Hello Lincoln,
>>
>> I don't think the viewId is set on the FacesContext until after
>> RESTORE_VIEW. It might work if you just manually call
>> facesContext.setViewId("/mypage.jsp").
>> ---
>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
> twitter:
>> jsfcentral
>> +1 203-404-4848 x3
>>
>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>
>>
>>
>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>> <lincolnbaxter@...> wrote:
>>>
>>> It's the same problem with a PhaseListener. If I am attempting to
>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>> find the outcome:
>>>
>>> "Unable to find matching navigation case from view ID '' for outcome
>>> '/faces/validation/target.jsf' "
>>>
>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>> successfully.
>>>
>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>> navigation, if not in a filter, at least in a PhaseListener before
>>> RESTORE_VIEW.
>>>
>>>
>>> --Lincoln
>>>
>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
> wrote:
>>> > Why would you want to use a Filter. Have you considered using
>>> > a PhaseListener instead?
>>> >
>>> > Manfred
>>> >
>>> > -----Original Message-----
>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>> > To: dev@...
>>> > Subject: Invoking FacesNavigation from a Filter
>>> >
>>> > Hi,
>>> >
>>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>> > work unless the outcome was defined in a navigation case in
>>> > faces-config.xml.
>>> >
>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>> >
>>> > I'm assuming this has to do with the fact that the view was not
>>> > restored and set into the context, but doing that manually with a
>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>> >
>>> > Thoughts? How can I properly build the facesContext object model to
>>> > support navigation in a filter?
>>> >
>>> > Thanks,
>>> > Lincoln
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>> > For additional commands, e-mail: dev-help@...
>>> >
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>> > For additional commands, e-mail: dev-help@...
>>> >
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

And yes, it does work with JSF1.x

On Tue, Nov 3, 2009 at 10:51 PM, Lincoln Baxter, III
<lincolnbaxter@...> wrote:

> That would work, but then you incur the cost of RESTORE_VIEW phase
> every time you do a navigation.
>
> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:
>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>> page?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 10:51 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> 2.0.1
>> Sent from my Verizon Wireless BlackBerry
>>
>> -----Original Message-----
>> From: "Manfred Riem" <mriem@...>
>> Date: Sat, 31 Oct 2009 20:34:29
>> To: <dev@...>
>> Subject:  RE: Invoking FacesNavigation from a Filter
>> Which version of JSF are you trying it on?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 3:39 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>
>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>> Hello Lincoln,
>>>
>>> I don't think the viewId is set on the FacesContext until after
>>> RESTORE_VIEW. It might work if you just manually call
>>> facesContext.setViewId("/mypage.jsp").
>>> ---
>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>> twitter:
>>> jsfcentral
>>> +1 203-404-4848 x3
>>>
>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>
>>>
>>>
>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>> <lincolnbaxter@...> wrote:
>>>>
>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>> find the outcome:
>>>>
>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>> '/faces/validation/target.jsf' "
>>>>
>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>> successfully.
>>>>
>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>> RESTORE_VIEW.
>>>>
>>>>
>>>> --Lincoln
>>>>
>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>> wrote:
>>>> > Why would you want to use a Filter. Have you considered using
>>>> > a PhaseListener instead?
>>>> >
>>>> > Manfred
>>>> >
>>>> > -----Original Message-----
>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>> > To: dev@...
>>>> > Subject: Invoking FacesNavigation from a Filter
>>>> >
>>>> > Hi,
>>>> >
>>>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>> > work unless the outcome was defined in a navigation case in
>>>> > faces-config.xml.
>>>> >
>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>> >
>>>> > I'm assuming this has to do with the fact that the view was not
>>>> > restored and set into the context, but doing that manually with a
>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>> >
>>>> > Thoughts? How can I properly build the facesContext object model to
>>>> > support navigation in a filter?
>>>> >
>>>> > Thanks,
>>>> > Lincoln
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail: dev-help@...
>>>> >
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail: dev-help@...
>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>> For additional commands, e-mail: dev-help@...
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Actually. I take that back. I think it only works if you have defined
a navigation case to handle that oucome. That's required in JSF1.x,
which is why it works, but JSF2 should be able to avoid that
requirement. Just look for a file that matches the name provided.

Ryan made a good point that there is no current view from which to
decide the FACES_MAPPING, but in that case, simply don't try to
translate the extension, and instead use the string as a literal... it
won't fix your mistakes, but it also won't get in your way.

On Tue, Nov 3, 2009 at 10:51 PM, Lincoln Baxter, III
<lincolnbaxter@...> wrote:

> And yes, it does work with JSF1.x
>
> On Tue, Nov 3, 2009 at 10:51 PM, Lincoln Baxter, III
> <lincolnbaxter@...> wrote:
>> That would work, but then you incur the cost of RESTORE_VIEW phase
>> every time you do a navigation.
>>
>> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:
>>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>>> page?
>>>
>>> Manfred
>>>
>>> -----Original Message-----
>>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>>> Sent: Saturday, October 31, 2009 10:51 PM
>>> To: dev@...
>>> Subject: Re: Invoking FacesNavigation from a Filter
>>>
>>> 2.0.1
>>> Sent from my Verizon Wireless BlackBerry
>>>
>>> -----Original Message-----
>>> From: "Manfred Riem" <mriem@...>
>>> Date: Sat, 31 Oct 2009 20:34:29
>>> To: <dev@...>
>>> Subject:  RE: Invoking FacesNavigation from a Filter
>>> Which version of JSF are you trying it on?
>>>
>>> Manfred
>>>
>>> -----Original Message-----
>>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>> Sent: Saturday, October 31, 2009 3:39 PM
>>> To: dev@...
>>> Subject: Re: Invoking FacesNavigation from a Filter
>>>
>>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>>
>>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>>> Hello Lincoln,
>>>>
>>>> I don't think the viewId is set on the FacesContext until after
>>>> RESTORE_VIEW. It might work if you just manually call
>>>> facesContext.setViewId("/mypage.jsp").
>>>> ---
>>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
>>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>>> twitter:
>>>> jsfcentral
>>>> +1 203-404-4848 x3
>>>>
>>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>>
>>>>
>>>>
>>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>>> <lincolnbaxter@...> wrote:
>>>>>
>>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>>> find the outcome:
>>>>>
>>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>>> '/faces/validation/target.jsf' "
>>>>>
>>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>>> successfully.
>>>>>
>>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>>> RESTORE_VIEW.
>>>>>
>>>>>
>>>>> --Lincoln
>>>>>
>>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>>> wrote:
>>>>> > Why would you want to use a Filter. Have you considered using
>>>>> > a PhaseListener instead?
>>>>> >
>>>>> > Manfred
>>>>> >
>>>>> > -----Original Message-----
>>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>>> > To: dev@...
>>>>> > Subject: Invoking FacesNavigation from a Filter
>>>>> >
>>>>> > Hi,
>>>>> >
>>>>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>>> > work unless the outcome was defined in a navigation case in
>>>>> > faces-config.xml.
>>>>> >
>>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>>> >
>>>>> > I'm assuming this has to do with the fact that the view was not
>>>>> > restored and set into the context, but doing that manually with a
>>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>>> >
>>>>> > Thoughts? How can I properly build the facesContext object model to
>>>>> > support navigation in a filter?
>>>>> >
>>>>> > Thanks,
>>>>> > Lincoln
>>>>> >
>>>>> > ---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> > For additional commands, e-mail: dev-help@...
>>>>> >
>>>>> >
>>>>> >
>>>>> > ---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> > For additional commands, e-mail: dev-help@...
>>>>> >
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> For additional commands, e-mail: dev-help@...
>>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


RE: Invoking FacesNavigation from a Filter

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Would that even be the case if you handle the event before
the RESTORE_VIEW phase using before?

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Tuesday, November 03, 2009 8:51 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

That would work, but then you incur the cost of RESTORE_VIEW phase
every time you do a navigation.

On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:

> Is there any reason why you can just dispatch using the actual jsp/xhtml
> page?
>
> Manfred
>
> -----Original Message-----
> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
> Sent: Saturday, October 31, 2009 10:51 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> 2.0.1
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: "Manfred Riem" <mriem@...>
> Date: Sat, 31 Oct 2009 20:34:29
> To: <dev@...>
> Subject:  RE: Invoking FacesNavigation from a Filter
> Which version of JSF are you trying it on?
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Saturday, October 31, 2009 3:39 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>
> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>> Hello Lincoln,
>>
>> I don't think the viewId is set on the FacesContext until after
>> RESTORE_VIEW. It might work if you just manually call
>> facesContext.setViewId("/mypage.jsp").
>> ---
>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
consulting

>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
> twitter:
>> jsfcentral
>> +1 203-404-4848 x3
>>
>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>
>>
>>
>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>> <lincolnbaxter@...> wrote:
>>>
>>> It's the same problem with a PhaseListener. If I am attempting to
>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>> find the outcome:
>>>
>>> "Unable to find matching navigation case from view ID '' for outcome
>>> '/faces/validation/target.jsf' "
>>>
>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>> successfully.
>>>
>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>> navigation, if not in a filter, at least in a PhaseListener before
>>> RESTORE_VIEW.
>>>
>>>
>>> --Lincoln
>>>
>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
> wrote:
>>> > Why would you want to use a Filter. Have you considered using
>>> > a PhaseListener instead?
>>> >
>>> > Manfred
>>> >
>>> > -----Original Message-----
>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>> > To: dev@...
>>> > Subject: Invoking FacesNavigation from a Filter
>>> >
>>> > Hi,
>>> >
>>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>> > work unless the outcome was defined in a navigation case in
>>> > faces-config.xml.
>>> >
>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>> >
>>> > I'm assuming this has to do with the fact that the view was not
>>> > restored and set into the context, but doing that manually with a
>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>> >
>>> > Thoughts? How can I properly build the facesContext object model to
>>> > support navigation in a filter?
>>> >
>>> > Thanks,
>>> > Lincoln
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>> > For additional commands, e-mail: dev-help@...
>>> >
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>> > For additional commands, e-mail: dev-help@...
>>> >
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, the functionality is not there until after RESTORE_VIEW.

On Tue, Nov 3, 2009 at 11:24 PM, Manfred Riem <mriem@...> wrote:

> Would that even be the case if you handle the event before
> the RESTORE_VIEW phase using before?
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 8:51 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> That would work, but then you incur the cost of RESTORE_VIEW phase
> every time you do a navigation.
>
> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:
>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>> page?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 10:51 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> 2.0.1
>> Sent from my Verizon Wireless BlackBerry
>>
>> -----Original Message-----
>> From: "Manfred Riem" <mriem@...>
>> Date: Sat, 31 Oct 2009 20:34:29
>> To: <dev@...>
>> Subject:  RE: Invoking FacesNavigation from a Filter
>> Which version of JSF are you trying it on?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 3:39 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>
>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>> Hello Lincoln,
>>>
>>> I don't think the viewId is set on the FacesContext until after
>>> RESTORE_VIEW. It might work if you just manually call
>>> facesContext.setViewId("/mypage.jsp").
>>> ---
>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> consulting
>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>> twitter:
>>> jsfcentral
>>> +1 203-404-4848 x3
>>>
>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>
>>>
>>>
>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>> <lincolnbaxter@...> wrote:
>>>>
>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>> find the outcome:
>>>>
>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>> '/faces/validation/target.jsf' "
>>>>
>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>> successfully.
>>>>
>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>> RESTORE_VIEW.
>>>>
>>>>
>>>> --Lincoln
>>>>
>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>> wrote:
>>>> > Why would you want to use a Filter. Have you considered using
>>>> > a PhaseListener instead?
>>>> >
>>>> > Manfred
>>>> >
>>>> > -----Original Message-----
>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>> > To: dev@...
>>>> > Subject: Invoking FacesNavigation from a Filter
>>>> >
>>>> > Hi,
>>>> >
>>>> > I'm trying to invoke default FacesNavigation from a filter (Where I've
>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>> > work unless the outcome was defined in a navigation case in
>>>> > faces-config.xml.
>>>> >
>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or a
>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>> >
>>>> > I'm assuming this has to do with the fact that the view was not
>>>> > restored and set into the context, but doing that manually with a
>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>> >
>>>> > Thoughts? How can I properly build the facesContext object model to
>>>> > support navigation in a filter?
>>>> >
>>>> > Thanks,
>>>> > Lincoln
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail: dev-help@...
>>>> >
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail: dev-help@...
>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>> For additional commands, e-mail: dev-help@...
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


RE: Invoking FacesNavigation from a Filter

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Do you mean beforePhase(PhaseEvent) is not capable of handling
your usage scenario.

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Tuesday, November 03, 2009 9:26 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

Yes, the functionality is not there until after RESTORE_VIEW.

On Tue, Nov 3, 2009 at 11:24 PM, Manfred Riem <mriem@...> wrote:

> Would that even be the case if you handle the event before
> the RESTORE_VIEW phase using before?
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 8:51 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> That would work, but then you incur the cost of RESTORE_VIEW phase
> every time you do a navigation.
>
> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:
>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>> page?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 10:51 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> 2.0.1
>> Sent from my Verizon Wireless BlackBerry
>>
>> -----Original Message-----
>> From: "Manfred Riem" <mriem@...>
>> Date: Sat, 31 Oct 2009 20:34:29
>> To: <dev@...>
>> Subject:  RE: Invoking FacesNavigation from a Filter
>> Which version of JSF are you trying it on?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 3:39 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>
>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>> Hello Lincoln,
>>>
>>> I don't think the viewId is set on the FacesContext until after
>>> RESTORE_VIEW. It might work if you just manually call
>>> facesContext.setViewId("/mypage.jsp").
>>> ---
>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> consulting
>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>> twitter:
>>> jsfcentral
>>> +1 203-404-4848 x3
>>>
>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>
>>>
>>>
>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>> <lincolnbaxter@...> wrote:
>>>>
>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>> find the outcome:
>>>>
>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>> '/faces/validation/target.jsf' "
>>>>
>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>> successfully.
>>>>
>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>> RESTORE_VIEW.
>>>>
>>>>
>>>> --Lincoln
>>>>
>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>> wrote:
>>>> > Why would you want to use a Filter. Have you considered using
>>>> > a PhaseListener instead?
>>>> >
>>>> > Manfred
>>>> >
>>>> > -----Original Message-----
>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>> > To: dev@...
>>>> > Subject: Invoking FacesNavigation from a Filter
>>>> >
>>>> > Hi,
>>>> >
>>>> > I'm trying to invoke default FacesNavigation from a filter (Where
I've
>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>> > work unless the outcome was defined in a navigation case in
>>>> > faces-config.xml.
>>>> >
>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or
a

>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>> >
>>>> > I'm assuming this has to do with the fact that the view was not
>>>> > restored and set into the context, but doing that manually with a
>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>> >
>>>> > Thoughts? How can I properly build the facesContext object model to
>>>> > support navigation in a filter?
>>>> >
>>>> > Thanks,
>>>> > Lincoln
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail:
dev-help@...
>>>> >
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail:
dev-help@...

>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>> For additional commands, e-mail: dev-help@...
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes. That is correct.
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Manfred Riem" <mriem@...>
Date: Tue, 3 Nov 2009 21:28:56
To: <dev@...>
Subject:  RE: Invoking FacesNavigation from a Filter
Do you mean beforePhase(PhaseEvent) is not capable of handling
your usage scenario.

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Tuesday, November 03, 2009 9:26 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

Yes, the functionality is not there until after RESTORE_VIEW.

On Tue, Nov 3, 2009 at 11:24 PM, Manfred Riem <mriem@...> wrote:

> Would that even be the case if you handle the event before
> the RESTORE_VIEW phase using before?
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 8:51 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> That would work, but then you incur the cost of RESTORE_VIEW phase
> every time you do a navigation.
>
> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:
>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>> page?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 10:51 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> 2.0.1
>> Sent from my Verizon Wireless BlackBerry
>>
>> -----Original Message-----
>> From: "Manfred Riem" <mriem@...>
>> Date: Sat, 31 Oct 2009 20:34:29
>> To: <dev@...>
>> Subject:  RE: Invoking FacesNavigation from a Filter
>> Which version of JSF are you trying it on?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 3:39 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>
>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>> Hello Lincoln,
>>>
>>> I don't think the viewId is set on the FacesContext until after
>>> RESTORE_VIEW. It might work if you just manually call
>>> facesContext.setViewId("/mypage.jsp").
>>> ---
>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> consulting
>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>> twitter:
>>> jsfcentral
>>> +1 203-404-4848 x3
>>>
>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>
>>>
>>>
>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>> <lincolnbaxter@...> wrote:
>>>>
>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>> find the outcome:
>>>>
>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>> '/faces/validation/target.jsf' "
>>>>
>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>> successfully.
>>>>
>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>> RESTORE_VIEW.
>>>>
>>>>
>>>> --Lincoln
>>>>
>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>> wrote:
>>>> > Why would you want to use a Filter. Have you considered using
>>>> > a PhaseListener instead?
>>>> >
>>>> > Manfred
>>>> >
>>>> > -----Original Message-----
>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>> > To: dev@...
>>>> > Subject: Invoking FacesNavigation from a Filter
>>>> >
>>>> > Hi,
>>>> >
>>>> > I'm trying to invoke default FacesNavigation from a filter (Where
I've
>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>> > work unless the outcome was defined in a navigation case in
>>>> > faces-config.xml.
>>>> >
>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or
a

>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>> >
>>>> > I'm assuming this has to do with the fact that the view was not
>>>> > restored and set into the context, but doing that manually with a
>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>> >
>>>> > Thoughts? How can I properly build the facesContext object model to
>>>> > support navigation in a filter?
>>>> >
>>>> > Thanks,
>>>> > Lincoln
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail:
dev-help@...
>>>> >
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail:
dev-help@...

>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>> For additional commands, e-mail: dev-help@...
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


RE: Invoking FacesNavigation from a Filter

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mmm,

I have successfully used a beforePhase(PhaseEvent) to dispatch
it to either a JSF page or a regular page without problems.

Manfred

-----Original Message-----
From: lincolnbaxter@... [mailto:lincolnbaxter@...]
Sent: Tuesday, November 03, 2009 10:17 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

Yes. That is correct.
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Manfred Riem" <mriem@...>
Date: Tue, 3 Nov 2009 21:28:56
To: <dev@...>
Subject:  RE: Invoking FacesNavigation from a Filter
Do you mean beforePhase(PhaseEvent) is not capable of handling
your usage scenario.

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Tuesday, November 03, 2009 9:26 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

Yes, the functionality is not there until after RESTORE_VIEW.

On Tue, Nov 3, 2009 at 11:24 PM, Manfred Riem <mriem@...> wrote:

> Would that even be the case if you handle the event before
> the RESTORE_VIEW phase using before?
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 8:51 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> That would work, but then you incur the cost of RESTORE_VIEW phase
> every time you do a navigation.
>
> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:
>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>> page?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 10:51 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> 2.0.1
>> Sent from my Verizon Wireless BlackBerry
>>
>> -----Original Message-----
>> From: "Manfred Riem" <mriem@...>
>> Date: Sat, 31 Oct 2009 20:34:29
>> To: <dev@...>
>> Subject:  RE: Invoking FacesNavigation from a Filter
>> Which version of JSF are you trying it on?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> Sent: Saturday, October 31, 2009 3:39 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>
>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>> Hello Lincoln,
>>>
>>> I don't think the viewId is set on the FacesContext until after
>>> RESTORE_VIEW. It might work if you just manually call
>>> facesContext.setViewId("/mypage.jsp").
>>> ---
>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> consulting
>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>> twitter:
>>> jsfcentral
>>> +1 203-404-4848 x3
>>>
>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>
>>>
>>>
>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>> <lincolnbaxter@...> wrote:
>>>>
>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>> find the outcome:
>>>>
>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>> '/faces/validation/target.jsf' "
>>>>
>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>> successfully.
>>>>
>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>> RESTORE_VIEW.
>>>>
>>>>
>>>> --Lincoln
>>>>
>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>> wrote:
>>>> > Why would you want to use a Filter. Have you considered using
>>>> > a PhaseListener instead?
>>>> >
>>>> > Manfred
>>>> >
>>>> > -----Original Message-----
>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>> > To: dev@...
>>>> > Subject: Invoking FacesNavigation from a Filter
>>>> >
>>>> > Hi,
>>>> >
>>>> > I'm trying to invoke default FacesNavigation from a filter (Where
I've
>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>> > work unless the outcome was defined in a navigation case in
>>>> > faces-config.xml.
>>>> >
>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or
a

>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>> >
>>>> > I'm assuming this has to do with the fact that the view was not
>>>> > restored and set into the context, but doing that manually with a
>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>> >
>>>> > Thoughts? How can I properly build the facesContext object model to
>>>> > support navigation in a filter?
>>>> >
>>>> > Thanks,
>>>> > Lincoln
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail:
dev-help@...
>>>> >
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>> > For additional commands, e-mail:
dev-help@...

>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>> For additional commands, e-mail: dev-help@...
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

But can you do it using the NavigationHandler before()
RENDER_RESPONSE? And are you using JSF2 simplified navigation (without
an entry in faces-config.xml) to directly navigate to the target view?

If it works for you then I must be doing something wrong.

On Wed, Nov 4, 2009 at 12:21 AM, Manfred Riem <mriem@...> wrote:

> Mmm,
>
> I have successfully used a beforePhase(PhaseEvent) to dispatch
> it to either a JSF page or a regular page without problems.
>
> Manfred
>
> -----Original Message-----
> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 10:17 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> Yes. That is correct.
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: "Manfred Riem" <mriem@...>
> Date: Tue, 3 Nov 2009 21:28:56
> To: <dev@...>
> Subject:  RE: Invoking FacesNavigation from a Filter
> Do you mean beforePhase(PhaseEvent) is not capable of handling
> your usage scenario.
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 9:26 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> Yes, the functionality is not there until after RESTORE_VIEW.
>
> On Tue, Nov 3, 2009 at 11:24 PM, Manfred Riem <mriem@...> wrote:
>> Would that even be the case if you handle the event before
>> the RESTORE_VIEW phase using before?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> Sent: Tuesday, November 03, 2009 8:51 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> That would work, but then you incur the cost of RESTORE_VIEW phase
>> every time you do a navigation.
>>
>> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...> wrote:
>>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>>> page?
>>>
>>> Manfred
>>>
>>> -----Original Message-----
>>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>>> Sent: Saturday, October 31, 2009 10:51 PM
>>> To: dev@...
>>> Subject: Re: Invoking FacesNavigation from a Filter
>>>
>>> 2.0.1
>>> Sent from my Verizon Wireless BlackBerry
>>>
>>> -----Original Message-----
>>> From: "Manfred Riem" <mriem@...>
>>> Date: Sat, 31 Oct 2009 20:34:29
>>> To: <dev@...>
>>> Subject:  RE: Invoking FacesNavigation from a Filter
>>> Which version of JSF are you trying it on?
>>>
>>> Manfred
>>>
>>> -----Original Message-----
>>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>> Sent: Saturday, October 31, 2009 3:39 PM
>>> To: dev@...
>>> Subject: Re: Invoking FacesNavigation from a Filter
>>>
>>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>>
>>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>>> Hello Lincoln,
>>>>
>>>> I don't think the viewId is set on the FacesContext until after
>>>> RESTORE_VIEW. It might work if you just manually call
>>>> facesContext.setViewId("/mypage.jsp").
>>>> ---
>>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
>> consulting
>>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>>> twitter:
>>>> jsfcentral
>>>> +1 203-404-4848 x3
>>>>
>>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>>
>>>>
>>>>
>>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>>> <lincolnbaxter@...> wrote:
>>>>>
>>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>>> find the outcome:
>>>>>
>>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>>> '/faces/validation/target.jsf' "
>>>>>
>>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>>> successfully.
>>>>>
>>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>>> RESTORE_VIEW.
>>>>>
>>>>>
>>>>> --Lincoln
>>>>>
>>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>>> wrote:
>>>>> > Why would you want to use a Filter. Have you considered using
>>>>> > a PhaseListener instead?
>>>>> >
>>>>> > Manfred
>>>>> >
>>>>> > -----Original Message-----
>>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>>> > To: dev@...
>>>>> > Subject: Invoking FacesNavigation from a Filter
>>>>> >
>>>>> > Hi,
>>>>> >
>>>>> > I'm trying to invoke default FacesNavigation from a filter (Where
> I've
>>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>>> > work unless the outcome was defined in a navigation case in
>>>>> > faces-config.xml.
>>>>> >
>>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or
> a
>>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>>> >
>>>>> > I'm assuming this has to do with the fact that the view was not
>>>>> > restored and set into the context, but doing that manually with a
>>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>>> >
>>>>> > Thoughts? How can I properly build the facesContext object model to
>>>>> > support navigation in a filter?
>>>>> >
>>>>> > Thanks,
>>>>> > Lincoln
>>>>> >
>>>>> > ---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> > For additional commands, e-mail:
> dev-help@...
>>>>> >
>>>>> >
>>>>> >
>>>>> > ---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> > For additional commands, e-mail:
> dev-help@...
>>>>> >
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> For additional commands, e-mail: dev-help@...
>>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


RE: Invoking FacesNavigation from a Filter

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

No not using the NavigationHandler I am using dispatch on the
ExternalContext.
And then I don't need to know about the navigation model at all. But it does
require me to know the application.

Do you need a code snippet?

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Tuesday, November 03, 2009 10:50 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

But can you do it using the NavigationHandler before()
RENDER_RESPONSE? And are you using JSF2 simplified navigation (without
an entry in faces-config.xml) to directly navigate to the target view?

If it works for you then I must be doing something wrong.

On Wed, Nov 4, 2009 at 12:21 AM, Manfred Riem <mriem@...> wrote:

> Mmm,
>
> I have successfully used a beforePhase(PhaseEvent) to dispatch
> it to either a JSF page or a regular page without problems.
>
> Manfred
>
> -----Original Message-----
> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 10:17 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> Yes. That is correct.
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: "Manfred Riem" <mriem@...>
> Date: Tue, 3 Nov 2009 21:28:56
> To: <dev@...>
> Subject:  RE: Invoking FacesNavigation from a Filter
> Do you mean beforePhase(PhaseEvent) is not capable of handling
> your usage scenario.
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 9:26 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> Yes, the functionality is not there until after RESTORE_VIEW.
>
> On Tue, Nov 3, 2009 at 11:24 PM, Manfred Riem <mriem@...> wrote:
>> Would that even be the case if you handle the event before
>> the RESTORE_VIEW phase using before?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> Sent: Tuesday, November 03, 2009 8:51 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> That would work, but then you incur the cost of RESTORE_VIEW phase
>> every time you do a navigation.
>>
>> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...>
wrote:

>>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>>> page?
>>>
>>> Manfred
>>>
>>> -----Original Message-----
>>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>>> Sent: Saturday, October 31, 2009 10:51 PM
>>> To: dev@...
>>> Subject: Re: Invoking FacesNavigation from a Filter
>>>
>>> 2.0.1
>>> Sent from my Verizon Wireless BlackBerry
>>>
>>> -----Original Message-----
>>> From: "Manfred Riem" <mriem@...>
>>> Date: Sat, 31 Oct 2009 20:34:29
>>> To: <dev@...>
>>> Subject:  RE: Invoking FacesNavigation from a Filter
>>> Which version of JSF are you trying it on?
>>>
>>> Manfred
>>>
>>> -----Original Message-----
>>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>> Sent: Saturday, October 31, 2009 3:39 PM
>>> To: dev@...
>>> Subject: Re: Invoking FacesNavigation from a Filter
>>>
>>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>>
>>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>>> Hello Lincoln,
>>>>
>>>> I don't think the viewId is set on the FacesContext until after
>>>> RESTORE_VIEW. It might work if you just manually call
>>>> facesContext.setViewId("/mypage.jsp").
>>>> ---
>>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
>> consulting
>>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>>> twitter:
>>>> jsfcentral
>>>> +1 203-404-4848 x3
>>>>
>>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>>
>>>>
>>>>
>>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>>> <lincolnbaxter@...> wrote:
>>>>>
>>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>>> find the outcome:
>>>>>
>>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>>> '/faces/validation/target.jsf' "
>>>>>
>>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>>> successfully.
>>>>>
>>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>>> RESTORE_VIEW.
>>>>>
>>>>>
>>>>> --Lincoln
>>>>>
>>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>>> wrote:
>>>>> > Why would you want to use a Filter. Have you considered using
>>>>> > a PhaseListener instead?
>>>>> >
>>>>> > Manfred
>>>>> >
>>>>> > -----Original Message-----
>>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>>> > To: dev@...
>>>>> > Subject: Invoking FacesNavigation from a Filter
>>>>> >
>>>>> > Hi,
>>>>> >
>>>>> > I'm trying to invoke default FacesNavigation from a filter (Where
> I've
>>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>>> > work unless the outcome was defined in a navigation case in
>>>>> > faces-config.xml.
>>>>> >
>>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or
> a
>>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>>> >
>>>>> > I'm assuming this has to do with the fact that the view was not
>>>>> > restored and set into the context, but doing that manually with a
>>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>>> >
>>>>> > Thoughts? How can I properly build the facesContext object model to
>>>>> > support navigation in a filter?
>>>>> >
>>>>> > Thanks,
>>>>> > Lincoln
>>>>> >
>>>>> >
---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> > For additional commands, e-mail:
> dev-help@...
>>>>> >
>>>>> >
>>>>> >
>>>>> >
---------------------------------------------------------------------

>>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> > For additional commands, e-mail:
> dev-help@...
>>>>> >
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> For additional commands, e-mail: dev-help@...
>>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Invoking FacesNavigation from a Filter

by lincolnbaxter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ahh I see. Yes dispatch will work fine, but the idea is that if like to support navigation through the native API to get things like view resolution and nav cases.
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Manfred Riem" <mriem@...>
Date: Wed, 4 Nov 2009 07:25:57
To: <dev@...>
Subject:  RE: Invoking FacesNavigation from a Filter
Hi there,

No not using the NavigationHandler I am using dispatch on the
ExternalContext.
And then I don't need to know about the navigation model at all. But it does
require me to know the application.

Do you need a code snippet?

Manfred

-----Original Message-----
From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
Sent: Tuesday, November 03, 2009 10:50 PM
To: dev@...
Subject: Re: Invoking FacesNavigation from a Filter

But can you do it using the NavigationHandler before()
RENDER_RESPONSE? And are you using JSF2 simplified navigation (without
an entry in faces-config.xml) to directly navigate to the target view?

If it works for you then I must be doing something wrong.

On Wed, Nov 4, 2009 at 12:21 AM, Manfred Riem <mriem@...> wrote:

> Mmm,
>
> I have successfully used a beforePhase(PhaseEvent) to dispatch
> it to either a JSF page or a regular page without problems.
>
> Manfred
>
> -----Original Message-----
> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 10:17 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> Yes. That is correct.
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: "Manfred Riem" <mriem@...>
> Date: Tue, 3 Nov 2009 21:28:56
> To: <dev@...>
> Subject:  RE: Invoking FacesNavigation from a Filter
> Do you mean beforePhase(PhaseEvent) is not capable of handling
> your usage scenario.
>
> Manfred
>
> -----Original Message-----
> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
> Sent: Tuesday, November 03, 2009 9:26 PM
> To: dev@...
> Subject: Re: Invoking FacesNavigation from a Filter
>
> Yes, the functionality is not there until after RESTORE_VIEW.
>
> On Tue, Nov 3, 2009 at 11:24 PM, Manfred Riem <mriem@...> wrote:
>> Would that even be the case if you handle the event before
>> the RESTORE_VIEW phase using before?
>>
>> Manfred
>>
>> -----Original Message-----
>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>> Sent: Tuesday, November 03, 2009 8:51 PM
>> To: dev@...
>> Subject: Re: Invoking FacesNavigation from a Filter
>>
>> That would work, but then you incur the cost of RESTORE_VIEW phase
>> every time you do a navigation.
>>
>> On Sun, Nov 1, 2009 at 10:45 AM, Manfred Riem <mriem@...>
wrote:

>>> Is there any reason why you can just dispatch using the actual jsp/xhtml
>>> page?
>>>
>>> Manfred
>>>
>>> -----Original Message-----
>>> From: lincolnbaxter@... [mailto:lincolnbaxter@...]
>>> Sent: Saturday, October 31, 2009 10:51 PM
>>> To: dev@...
>>> Subject: Re: Invoking FacesNavigation from a Filter
>>>
>>> 2.0.1
>>> Sent from my Verizon Wireless BlackBerry
>>>
>>> -----Original Message-----
>>> From: "Manfred Riem" <mriem@...>
>>> Date: Sat, 31 Oct 2009 20:34:29
>>> To: <dev@...>
>>> Subject:  RE: Invoking FacesNavigation from a Filter
>>> Which version of JSF are you trying it on?
>>>
>>> Manfred
>>>
>>> -----Original Message-----
>>> From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>> Sent: Saturday, October 31, 2009 3:39 PM
>>> To: dev@...
>>> Subject: Re: Invoking FacesNavigation from a Filter
>>>
>>> Yeah, setViewRoot(), that doesn't do it :( I'm not sure why.
>>>
>>> On Sat, Oct 31, 2009 at 5:37 PM, Kito Mann <kito.mann@...> wrote:
>>>> Hello Lincoln,
>>>>
>>>> I don't think the viewId is set on the FacesContext until after
>>>> RESTORE_VIEW. It might work if you just manually call
>>>> facesContext.setViewId("/mypage.jsp").
>>>> ---
>>>> Kito D. Mann | twitter: kito99 | Author, JSF in Action
>>>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
>> consulting
>>>> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>>> twitter:
>>>> jsfcentral
>>>> +1 203-404-4848 x3
>>>>
>>>> JSF Summit Conference Dec 1st-4th in Orlando: http://www.jsfsummit.com
>>>>
>>>>
>>>>
>>>> On Sat, Oct 31, 2009 at 5:06 PM, Lincoln Baxter, III
>>>> <lincolnbaxter@...> wrote:
>>>>>
>>>>> It's the same problem with a PhaseListener. If I am attempting to
>>>>> invoke navigation before RESTORE_VIEW phase, NavigationHandler cannot
>>>>> find the outcome:
>>>>>
>>>>> "Unable to find matching navigation case from view ID '' for outcome
>>>>> '/faces/validation/target.jsf' "
>>>>>
>>>>> If I invoke navigation *after* RESTORE_VIEW phase, it resolves
>>>>> successfully.
>>>>>
>>>>> Perhaps this is just a bug? I feel like I should be able to invoke
>>>>> navigation, if not in a filter, at least in a PhaseListener before
>>>>> RESTORE_VIEW.
>>>>>
>>>>>
>>>>> --Lincoln
>>>>>
>>>>> On Sat, Oct 31, 2009 at 4:11 PM, Manfred Riem <mriem@...>
>>> wrote:
>>>>> > Why would you want to use a Filter. Have you considered using
>>>>> > a PhaseListener instead?
>>>>> >
>>>>> > Manfred
>>>>> >
>>>>> > -----Original Message-----
>>>>> > From: Lincoln Baxter, III [mailto:lincolnbaxter@...]
>>>>> > Sent: Saturday, October 31, 2009 1:12 PM
>>>>> > To: dev@...
>>>>> > Subject: Invoking FacesNavigation from a Filter
>>>>> >
>>>>> > Hi,
>>>>> >
>>>>> > I'm trying to invoke default FacesNavigation from a filter (Where
> I've
>>>>> > already instantiated a FacesContext,) but I can't seem to get it to
>>>>> > work unless the outcome was defined in a navigation case in
>>>>> > faces-config.xml.
>>>>> >
>>>>> > When the navigation case is a direct navigation (/faces/demo.jsf) or
> a
>>>>> > relative navigation string (eg: demo.jsf), no navigation occurs.
>>>>> >
>>>>> > I'm assuming this has to do with the fact that the view was not
>>>>> > restored and set into the context, but doing that manually with a
>>>>> > viewId of "" to prevent NullPointerException doesn't work either.
>>>>> >
>>>>> > Thoughts? How can I properly build the facesContext object model to
>>>>> > support navigation in a filter?
>>>>> >
>>>>> > Thanks,
>>>>> > Lincoln
>>>>> >
>>>>> >
---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> > For additional commands, e-mail:
> dev-help@...
>>>>> >
>>>>> >
>>>>> >
>>>>> >
---------------------------------------------------------------------

>>>>> > To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> > For additional commands, e-mail:
> dev-help@...
>>>>> >
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> For additional commands, e-mail: dev-help@...
>>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...