0 Replies Latest reply on Aug 19, 2008 11:28 PM by terryb

    a4j:commandLink opening in new window


      Is it possible to redirect request submitted with a4j:commandLink to a new window?

      I have a xhtml search page with a4j:form on it; when user types in some data and click Submit (a4j:commandLink), the form should submit to update backing bean and open results in a new window.

      is it possible with aj4/richfaces?

      I tried using a4j:commndLink's target="myWindowName" tag and onlick="window.open('','myWindowName')". It does submit a form, and open new window. but new window is blank and results get rendered in the same window.

      RichFaces 3.2.1.GA
      JBoss Seam 2.0.1GA

      t="return validateForm('unpaidApplication');" reRender="unpaidApplicationSearchResults, globalMessageRerenderer" rendered="#{!unpaidApplication.printable}">
       <a4j:commandLink id="printView" value="Print Preview" action="#{unpaidApplication.printViewAction('/report/unpaid-application.xhtml')}"
       target="myWindowName" styleClass="button float-left" onclick="window.open('','myWindowName');"/>
      The unpaidApplication.printViewAction loads data to display and retruns the url passed to it.
      There is no page.xml navigation for action unpaidApplication.printViewAction.