3 Replies Latest reply on Jul 18, 2014 3:43 AM by Michal Petrov

    rf4 a4j:mediaOutput event oncomplete

    Tanja Schöberl Newbie

      Hi,

      i have a mediaOutput which creates an Excel-Sheet. On event onclick I show a popupPanel which has a progressbar. When the export is finished I want to hide the popupPanel, but a4j:mediaOutput has no event oncomplete.

       

      Has anyone an idea how i can hide the popupPanel?

       

      My code:

      <a4j:mediaOutput element="a" createContent="#{exportController.getExcelFile}" cacheable="false" id="createExcel"
           value="test.xls" mimeType="application/csv" styleClass="btnList" onclick="#{rich:component('inProgressPanel')}.show();">
           <h:outputText value="download excel" />
      </a4j:mediaOutput>
      
      <rich:popupPanel modal="true" id="inProgressPanel" width="500" height="150"
              resizeable="false" moveable="false" >
              <f:facet name="header">
                  <h:panelGroup>
                      Bitte warten...
                  </h:panelGroup>
              </f:facet>
              <div align="center">
                  <p>
                 Download!
                  <rich:progressBar mode="ajax" enabled="true" maxValue="100" value="99.9">
                      ...loading ...
                  </rich:progressBar>
                  </p>
              </div>
          </rich:popupPanel>
      
      

       

      Greets, Tanja