0 Replies Latest reply on Jun 18, 2009 8:48 PM by kindor

    Question about postAuthenticate action

    kindor
      Hi guys

      This one is probably an easy one, but I can get around it.

      My backing bean is annotated with @Restrict("#{identity.loggedIn}")

      When a user tries to invoke a method on it from a page with :

      <h:commandLink action="#{myBean.initComment(topicId)}" value="Post a comment"/>

      if he/she is not authenticated, then he/she gets redirected to the login page. Fine.

      1. I'm looking for a way to call the same method again automatically after they get authenticated.
      2. Were can I set the message to let them know that they are on the login page because they must login first ?

      There is no 'captureCurrentView' in this scenario, so it doesn't help. Am I right ?

      I have this in my component.xml:
           
      <event type="org.jboss.seam.notLoggedIn">
        <action execute="#{redirect.captureCurrentView}" />
      </event>

      <event type="org.jboss.seam.postAuthenticate">
         <action execute="#{redirect.returnToCapturedView}" />
      </event>


      Thanks