0 Replies Latest reply on Sep 10, 2009 3:42 PM by si2ni

    rich:modaPanel as progress bar to jasper report

      Hello gurus !

      I'm new with jsf and richfaces.

      I'm facing a problem trying synchronize opening a modalPanel with the following:

      <h:commandLink id="botao1" value="Gerar Relatorio PDF" action="#{faceRateio.printPDF}" onclick="Richfaces.showModalPanel('progressBar')"/>

      I'd like when the jasper finish the process I could hide the modalPanel.
      But there's no synch.
      This is my backing bean code:

      public String printPDF() throws ClassNotFoundException, SQLException, InterruptedException {

      FacesContext fc = FacesContext.getCurrentInstance();
      UIViewRoot view = fc.getViewRoot();
      UIModalPanel mp = (UIModalPanel)view.findComponent("progressBar");

      Reports pdf = new Reports();
      pdf.setBean(rateio);
      pdf.setJasperFile("PDFRateioFolha.jasper");
      pdf.run();

      mp.setShowWhenRendered(false);

      return "OpcoesExecucao";

      }

      The mp.setShowWhenRendered(false); seems never be executed to hide de modalPanel.

      What can be wrong ?

      Thanks in advance

      Marcelo