2 Replies Latest reply on Mar 26, 2007 8:48 AM by .:lexx:.

    s:link as popup window

    .:lexx:. Newbie

      Is it possible to handle s:link like a window.open in JS?
      Now it works like a redirect.

      Here is my code:

       <s:link action="#{packetSelector.selectPacket(packet)}">
       <ice:outputText value="#{packet.date}" title="Date">
       <f:convertDateTime pattern="#{uiConstants.defaultPattern}"/>
       </ice:outputText>
       </s:link>
      


      here is pages.xml configuration fragment:
      <page view-id="/index.jspx">
       <navigation from-action="#{packetSelector.selectPacket(packet)}">
       <render view-id="/packetDetails.jspx"/>
       </navigation>
       </page>
      


        • 1. Re: s:link as popup window
          John Newbie

          Hi there,

          In JSF, SEAM that is, you can't direct an URL to a popup window easily like in JSP world. Here are 2 solutions:

          1. <h:form target="_new">

          2. On the <s:link/> or <h:commandLink/>, do these:
          * <s:link target="jsWinId" onclick="window.open(null, 'jsWinId', 'windth=200,height=blah')" action="#{packetSelector.selectPacket(packet)}"/>


          *** MAKE sure you use and in your selectPacket method, return the mapping name from the faces-confg.xml if you use JSF navigation rule

          Hope that helps.

          • 2. Re: s:link as popup window
            .:lexx:. Newbie

            Great, this works!
            Many thanks :)