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

    Problem with popup window

    Abra Kadabra Newbie

      Hello,

      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:

      <h:form>
      
      <a4j:outputPanel id="panel" ajaxRendered="true" rendered="true">
       <f:subview id="subview">
      
       <a4j:region id="searchRegion" renderRegionOnly="false" >
      <!-- search fields-->
       </a4j:region>
      
       <h:commandButton id="search" styleClass="button"
       value="Search">
       <a4j:support reRender="#casesList,#{casesSearchBean.config.reRender}"
       event="onclick" disableDefault="true" actionListener="#{casesSearchBean.findElements}" />
       </h:commandButton>
      
       <a4j:region id="#{id}casesListRegion" renderRegionOnly="true">
      
       <h:dataTable ...usual attributes ... >
      
       <t:column>
       <h:commandLink id="showButton"
       action="#{bean.action}" value="Show"
       target="#{popupWindowID}"
       immediate="true"
       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(); "/>
      
       </t:column>
      
       </h:dataTable>
      
       </a4j:region>
      
       </f:subview id="subview">
      </a4j:outputPanel>
      
      </h:form>
      


      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,
      Radoslaw