Hi,
I have please the following problem with closing window dialog:
I have this JS function for opening and hiding window dialog:
function showDialog(id) { var igJsDwNode = ig.dw.getDwJsNodeById(id); if (igJsDwNode !== null) { igJsDwNode._show(); }}
function hideDialog(formName, id) { var igJsDwNode = ig.dw.getDwJsNodeById(formName + ':' + id); if (igJsDwNode !== null) { igJsDwNode._hide(); }}
I use this link for opening window dialog:
<h:graphicImage url="images/icon_add_binding.gif" onclick="showDialog('agSearchForm:agPopup');return false;" />
And here is window dialog definition:
<h:form id="agSearchForm"> <ig:dialogWindow id="agPopup" modal="true" windowState="hidden" initialPosition="manual" style="width:550px; height:500px; left:300px; top:120px;" rendered="#{assetController.asset.id > 0}"> <ig:dwHeader captionText="#{gui['assetGroup.list']}"> <ig:dwResizer /> <ig:dwCloseBox /> </ig:dwHeader> <ig:dwContentPane> <h:outputText value="#{gui['assetGroup.list']}" styleClass="heading3" /> <h:commandButton onclick="hideDialog(this.form.name, 'agPopup');return false;" value="#{gui['close']}" /> </ig:dwContentPane> </ig:dialogWindow> </h:form>
I'm not able to close dialog with cross but closing with my button works fine.
I use last hotfix (2014) version and MyFaces JSF implementation.
ANECT
You should avoid invoking JS functions beginning with undescore (_). These functions are "private". You have probably seen this in one of our examples, which is our issue and we will fix it. The right method to invoke for show/hide the DW is:
dw.set_windowState(ig.dw.STATE_NORMAL);
dw.set_windowState(ig.dw.STATE_HIDDEN);
However I just saw that there is a issue when invoking the "set_windowState" so probably you have to request a private hotfix for this issue using the support service.