This content has been marked as final.
Show 4 replies
-
1. Re: Any way to know what is the current view-id?
tom_goring May 17, 2008 11:14 AM (in response to eroussel)This will tell you the URL if that helps...
FacesContext.getCurrentInstance().getExternalContext().getRequestServletPath()
-
2. Re: Any way to know what is the current view-id?
stephen May 17, 2008 1:35 PM (in response to eroussel)And this will tell the view:
FacesContext.getCurrentInstance().getViewRoot().getViewId();
but I don't know how to do that from EL (other than putting that java code in an EL function or in a getter on some component).
-
3. Re: Any way to know what is the current view-id?
cpopetz May 17, 2008 2:14 PM (in response to eroussel)There's a seam manager component that wraps the current faces context, so you can just do:
#{facesContext.viewRoot.viewId}
in EL.
-
4. Re: Any way to know what is the current view-id?
hiasi29 May 18, 2008 11:11 PM (in response to eroussel)or
#{facesContext.viewRoot.viewId}
or
#{view.viewId}