This content has been marked as final.
Show 3 replies
-
1. Re: page view-id not equal to
amitev Feb 11, 2011 4:31 PM (in response to mmulligan03)You can use the if attribute of <action> tag. Like this:
<action execute="#{authenticator.setCookie()}" if="#{!'home.xhtml'.equals(facesContext.viewRoot.viewId)}" />
-
2. Re: page view-id not equal to
mmulligan03 Feb 14, 2011 8:45 AM (in response to mmulligan03)I have tried
<action execute="#{authenticator.setCookie()}" if="#{!'/home.xhtml'.equals(facesContext.viewRoot.viewId)}" />
and
<action execute="#{authenticator.setCookie()}" if="#{!facesContext.viewRoot.viewId.equals('/home.xhtml')}" />
Neither works, I added the / because when I print out facesContext.getViewRoot().getViewId() in the method the view is /home.xhtml
-
3. Re: page view-id not equal to
mmulligan03 Feb 14, 2011 9:28 AM (in response to mmulligan03)Never-mind my last post, I didn't realize that something else was calling the same method when the page loaded... Your suggestion did work, thank you for the post.