Reputation: 99
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.
Upvotes: 1
Views: 597
Reputation: 38163
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.
Upvotes: 1