myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Robinson <andrew.rw.robin...@gmail.com>
Subject Re: Obtaining the url?
Date Mon, 05 Dec 2005 21:20:56 GMT
It is set right after the view is created. This differs based on if
there is queued action. If there is an action, the new view is created
during the application invoke phase. If the view is new (new request
or a redirect), then the view is created earlier in the lifecycle (I
can't remember for sure, but I think I remember it being during the
restore view phase).

Once the view is created, getViewRoot() will not return null. Get view
ID on the view root should always return a value to my knowledge
(unless you have an odd view handler). The new view ID is always
available at the render response phase.

On 12/5/05, Julián García <jgarcia@unionsoluciones.com.co> wrote:
> Andrew Robinson wrote:
> > Are you looking for:
> > FacesContext.getCurrentInstance().getViewRoot().getViewId()?
> When is this id set....I am trying to access this method just after
> setting the values configured in my config xml, and it is always showing
> null.....
>
> Thanks-.
>
> >
> > On 11/28/05, Julián García <jgarcia@unionsoluciones.com.co> wrote:
> >
> >>How can I access the url that is being currently displayed for the user
> >>using the FacesContext? I need this to do a custom filter for
> >>authorization using acegi.....Any experiences to share with that?
> >>
> >>Thanks a lot.
> >>
> >>Julian
> >>
> >
> >
>
>

Mime
View raw message