I need to figure out what the current page is I'm on using a bean.
Something like getting the current form id from facesContext and compare it to a const string.
I need to figure out what the current page is I'm on using a bean.
Something like getting the current form id from facesContext and compare it to a const string.
You could use facesContext.getViewRoot().getViewId()
.
Be aware that this is the current JSF view that's being processed. If you use forwarding techniques via a Servlet or do navigation without a redirect, this is not necessarily the same as what the user's address bar is showing.