0 Replies Latest reply on Oct 12, 2009 9:34 AM by Sascha Janz

    progressbar closing modalpanel oncomplete

    Sascha Janz Master

      i got a modalpanel containing a progressbar.

      when i the progressbar is completed with 100% i want to close the modalpanel automatically.

      any idea how to do that?

      part of page is

       <a4j:region id="progressregion" rendered="#{Book.runningquery}">
       <h:form>
       <a4j:poll interval="100" reRender="progressPanel" />
       </h:form>
      
       <rich:modalPanel id="progressdlg" width="420" height="170" rendered="#{Book.runningquery}"
       showWhenRendered="true">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="Suche "></h:outputText>
      
       </h:panelGroup>
       </f:facet>
      
      
       <a4j:outputPanel id="progressPanel" >
      
       <center><rich:progressBar eventsQueue="eventQueue" reRenderAfterComplete="progress" enabled="#{Book.runningquery}"
       value="#{Book.percent}"
       label="#{Book.result.size()} Sätze gelesen"
       ignoreDupResponses="true" requestDelay="200">
       <f:facet name="complete"> <h:outputText value="fertig!" /> </f:facet>
       </rich:progressBar>
       </center>
       </a4j:outputPanel>
       <center><a4j:commandButton value="Verlassen"
       onclick="Richfaces.hideModalPanel('progressdlg')" /></center>
      
      
       </rich:modalPanel>
      
       </a4j:region>