1 Reply Latest reply on Aug 2, 2007 6:08 AM by Abra Kadabra

    Problem with popup window

    Abra Kadabra Newbie


      I have big problem with my h:commandButton which creates new browser window (preview element from list).
      Code structure is complicated, but it could be summarized to such pseudo-code:

      <a4j:outputPanel id="panel" ajaxRendered="true" rendered="true">
       <f:subview id="subview">
       <a4j:region id="searchRegion" renderRegionOnly="false" >
      <!-- search fields-->
       <h:commandButton id="search" styleClass="button"
       <a4j:support reRender="#casesList,#{casesSearchBean.config.reRender}"
       event="onclick" disableDefault="true" actionListener="#{casesSearchBean.findElements}" />
       <a4j:region id="#{id}casesListRegion" renderRegionOnly="true">
       <h:dataTable ...usual attributes ... >
       <h:commandLink id="showButton"
       action="#{bean.action}" value="Show"
       onclick="_popupWindow = window.open('','#{popupWindowID}','height=600,width=800,menubar=no,status=no,toolbar=no,dependent=yes,resizable=yes,alwaysRaised=yes,location=no'); _sifPopupWindow.focus(); "/>
       </f:subview id="subview">

      When I click on "showButton" everything works fine - a new window with row description appears. But when I try to search again and click "search" button the latest popup's window content appears in current window.
      I suppose that launching action "spoils" something in Ajax4JSF.

      Hoes anybody know how to fix it?
      And maybe there are examples showing how to show new browser window popup window from a4j:region?

      Best regards,