0 Replies Latest reply on Jan 27, 2012 3:54 PM by Erik Doetsch

    javascript popup seems to keep my bean from being called when closing self and refreshing parent

    Erik Doetsch Newbie

      My parent page has the following button which launches a popup:




      rendered="#{s:hasPermission('contract','terminate', null)}"



      onclick="setTerminateContract()" />




      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?