problem use richfaces progress bar
cerdiogenes Aug 12, 2008 1:41 AMHi,
While trying to use the progress bar I get in troubles.
I have this subview:
<f:subview xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:s="http://jboss.com/products/seam/taglib"> <rich:modalPanel id="panelDialogo" width="300" height="150"> <f:facet name="header"> <h:panelGroup> <h:outputText value="Aguarde"></h:outputText> </h:panelGroup> </f:facet> <div align="center"> <img src="../img/loader.gif" alt="Aguarde"/> <br/><br/> Esta operação pode demorar vários segundos, aguarde! </div> </rich:modalPanel> <h:commandButton value="Listar" id="listar" action="#{avlEtpAdcPssFisica.listar}"> <rich:componentControl for="panelDialogo" attachTo="listar" operation="show" event="onclick"/> </h:commandButton> </f:subview>
I also have this sub-view that contains the progress bar.
<f:subview xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:s="http://jboss.com/products/seam/taglib"> <rich:modalPanel id="panelProgresso" width="300" height="150"> <f:facet name="header"> <h:panelGroup> <h:outputText value="Operação em Andamento"></h:outputText> </h:panelGroup> </f:facet> <div align="center"> Aguarde, operação em adamento! <br/><br/> <h:form> <a4j:outputPanel id="progressPanel"> <rich:progressBar value="#{progressBarBean.currentValue}" interval="500" label="#{progressBarBean.currentValue} %" minValue="-1" maxValue="100" reRenderAfterComplete="progressPanel" mode="ajax"> </rich:progressBar> </a4j:outputPanel> </h:form> </div> </rich:modalPanel> <s:button value="Adicionar Avaliados Selecionados" id="adicionar" view="/admin/#{empty avlEtpAdcPssFisicaFrom ? 'AvlDesempenhoList' : avlEtpAdcPssFisicaFrom}.xhtml" action="#{avlEtpAdcPssFisica.adicionarSelecionados}" rendered="#{avlEtpAdcPssFisica.itensSelecionados.size > 0}"> <rich:componentControl for="panelProgresso" attachTo="adicionar" operation="show" event="onclick"/> </s:button> </f:subview>
When I click in the Listar
h:commandButton in the first view I get a conversation ended, timed out or was processing another request error.
I guess that the problem here is due the ajax call being made while processing another request, since my Listar
button do things that take a while do execute. I intended to show the progress to the user while this long task was executing, but I don't find a way. I already looked https://jira.jboss.org/jira/browse/JBSEAM-1832 , but it didn't give me any help.
There is something I can do to make this progress bar work, or there is no way to show this kind of information?
Thanks and best regards,
Carlos.