My parent page has the following button which launches a popup:
<h:commandButton
id="terminateButton"
rendered="#{s:hasPermission('contract','terminate', null)}"
value="#{messages.Terminate}"
class="formbutton"
onclick="setTerminateContract()" />
where:
function setTerminateContract() {
window.open("terminateContract.seam",'Terminate Contract', "menubar=no,width=350,height=300,toolbar=no");
}
In terminateContract.xhtml I have the OK button which is having problems now:
<h:commandButton id="okButton" value="#{messages.OK}" class="formbutton" action="#{contractAction.terminate}"
onclick="javascript:self.close(); opener.location.replace(opener.location + '?reload');" /></td>
So contractAction.terminate (a EJB exposed through Seam 2.2.2) is now no longer called when clicking ok.
If I remove the onclick variable, the EJB is reached but obviously the nice closing of the popup and refreshing of the parent must be done manually.
About 6 months ago we upgraded from JBoss 4.2.3 to 5.1 and Seam 1.2 to 2.2. Could this have had something to do with it?