1 Reply Latest reply on Mar 10, 2008 11:25 AM by ilya_shaikovsky

    Forwarding to new site using commandLink

    alexrozario

      Hi,

      I want to forward the user to new web site using commandLink.
      Most importantly before forwarding them i need to store the values in database in session bean.

      I have tried with all 3 possibilities

      html : <a href="#{val.productLink}" target="_blank" onclick="#{val.productFunction}">Help</a>
      jsf : <h:commandLink target="_blank" action="#{val.productFunction}">Help</h:commandLink>
      ajax : <a4j:commandLink target="_blank" action="#{val.productFunction}">Help</a4j:commandLink>


      Here,
      * if i use html, its not calling the function while clicking the link but it forwards the user to new site.
      * if i use jsf, its calling the function but its not forwarding to new site instead its opening the same page in new window
      * if i use ajax, its calling the function but its not forwarding anywhere

      Note : in the function i have retuned the link as
      return "http://www.jboss.com"


      Help me to finish it off.
      I need to forward the user information in database and forward them to new site if he clicks the link
      Thanks in advance.

      Alex