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>
I've just found solution: I have to call opener.clear_#{formname}() function from popup window. After firing up new window the form is not reinitialised.