0 Replies Latest reply on Jan 28, 2008 6:08 AM by alex rozario

    Forwarding after closing the modelpanel. (Interesing one.)

    alex rozario Newbie

      Hi all,

      In my website, if the user wants to see more details about the page he has to be registered before.
      So, if the user clicks the "More Details" link. I am checking whether the user is already logged in or not.
      If he has already logged in I am forwarding him to details page.
      But if he has not logged in before, I am showing up a login page using modalpanel. After he logged in I have to forward him to details page.
      And, here is the issue for me,
      Here the user needs to click the link again after logged in.
      How can I forward to the details page after the user logged in.

      <h:panelGroup id=â€Â�testâ€Â�>
       <h:panelGroup rendered="#{not identity.loggedIn}">
       <a4j:commandLink value="More details" onclick="javascript:Richfaces.showModalPanel('login',{width:450, top:200})" />
       <h:panelGroup rendered="#{identity.loggedIn}" >
       <s:link value="More details" view="/details.xhtml" />

      Note : If the user is not logged in I am showing the first link only. If the user logged in I am showing the second link only by re-rendering panelgroup id test

      And I want to add one more point here, in the same page there is another link for login. So I need to forward him to details page only if he clicks the "More details" link.