4 Replies Latest reply on May 5, 2011 3:20 AM by lfryc

    RichFaces4 popupPanel + a4j:poll

    edilmar

      Hi,

       

      I have to create a page where the user clicks a button, a popupPanel is showed and a message should be updated at intervals. And after some logic stops, I have to hide the popup, like a "slow processing window" for better user interface. I implement a test in this way:

       

            <h:form id="formpoll">

              <a4j:commandButton onclick="#{rich:component('popup')}.show()" action="#{teste.initPoll}" value="Init poll/popup"/>

              <rich:popupPanel id="popup" autosized="true" width="400" height="80" moveable="false" resizeable="false">

                <f:facet name="header"><h:outputText value="Processamento" /></f:facet>

                <h:outputText id="datePoll" value="#{teste.msgPoll}" />

                <a4j:poll id="poll" enabled="#{teste.enablePoll}" interval="1000" render="datePoll" oncomplete="#{rich:component('popup')}.hide()"/>

              </rich:popupPanel>

            </h:form>

      1. click button => show popupPanel => fine!

      2. update msgPoll using a4j:poll => fine!

      3. oncomplete doesn't wait for a logic to complete, it closes the popupPanel after 1000ms. How could I implement a way to automatically close the popupPanel after ending of process?