Maybe something like this.
| <exception
class="org.jboss.seam.security.AuthorizationException">
| <redirect view-id="/handleAuthorizationException.xhtml">
| <message>You don't have permission to do this</message>
| </redirect>
| </exception>
|
and in pages.xml
| <page view-id="/handleAuthorizationException.xhtml">
| <action if="#{empty authenticator.currentClient}"
execute="/ChooseClient.xhtml"/>
| <action if="#{not empty authenticator.currentClient}"
execute="/error.xhtml"/>
| </page>
|
I haven't tested it, but I'm pretty sure that'd work.
However, you may want to put a feature request in Jira for value expressions in the
view-id attribute of ExceptionHandlers (which would let your first approach work). I
could see it being a useful thing.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075058#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...