3 Replies Latest reply on Mar 14, 2012 3:26 AM by feuyeux

    popup window cannot be closed if there is a render action

    feuyeux

      Hi guys,

      I'm pizzled with this phenomemon, if you know the mechanism, please illustrate it. Thanks in advance!

       

      There are 3 component in my scenario:

      a4j:commandLink

      a4j:status

      rich:popupPanel

      When click the a4j:commandLink, a4j:status will start to work and show the rich:popupPanel, when the action method finished, a4j:status will know that and close the popup window.

       

      Code:

      <a4j:commandLink id="generateButton0" style="display:none" action="#{rBean.generate}" status="generateStatus" render="xxx"/>

      <a4j:status id="generateStatus" name="generateStatus" onstart="#{rich:component('processModalPanel')}.show();" onstop="#{rich:component('processModalPanel')}.hide();"/>

      <rich:popupPanel id="processModalPanel" ...

       

      Please note that the render property of a4j:commandLink, if I use it, the popup window will not be closed forever!

       

      But I want to render the xxx compont, so, what I did is adding a a4j:jsFunction to render:

      <a4j:jsFunction name="updateReportPanel" render="reportPanel"/>

       

      And more, I change the status' onstop method:

      onstop="#{rich:component('processModalPanel')}.hide();updateReportPanel();"

       

      Now, it works. But I want to know the flow or lifecycle of total process in this scenario, why the first solution cannot work?

       

      Thanks again!

       

      Eric Han