RichFaces4 dataScroller+a4j:status doesn't work
edilmar Apr 1, 2011 3:57 PMHi,
I have a dataTable + dataScroller to change page. When I click to change from page 1 to page 2, I start a popupPanel with a4j:status to show a message to user about "Processing...". However, after process the page 2 and show it, the a4j:status should hide the popupPanel, not freeze the window, like the image below:
Look that I already clicked into the link for page 2, that page was processed (from index 21 to 40, first column), but the popupPanel continues there. The JSF code is below, and it worked fine in RichFaces 3.3.3 with datascroller + modalPanel:
<rich:panel style="width:100%;">
<f:facet name="header">
<h:outputText value="#{msgCliente['consViagens.labelTitulo']}"></h:outputText>
</f:facet>
<h:form id="formCad">
<a4j:status id ="status" onstart="#{rich:component('splash')}.show()" onstop="#{rich:component('splash')}.hide()" />
<rich:popupPanel id="splash" autosized="true" width="200" height="80" moveable="false" resizeable="false">
<f:facet name="header"><h:outputText value="#{msgGeral['splash.titulo']}" /></f:facet>
<h:outputText value="#{msgGeral['splash.msg']}" />
</rich:popupPanel>
<p>
<rich:dataTable id="table" rows="#{login.maxResultPagina}"
onrowmouseover="this.style.backgroundColor='#F1F1F1'"
onrowmouseout="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
var="item" rowKeyVar="rowListTable"
value="#{consViagensCliente.listTable}"
rendered="#{consViagensCliente.listTable != null}"
>
<rich:column width="0px" id="indice" styleClass="alignCenter">
<f:facet name="header"><h:outputText styleClass="headerText" value="" /></f:facet>
<h:outputLabel value="#{rowListTable+1}" />
</rich:column>
<rich:column width="60px" id="numConhecimento" styleClass="alignCenter">
<f:facet name="header"><h:outputText styleClass="headerText" value="#{msgCliente['consViagens.table.labelNumConhec']}" /></f:facet>
<f:subview id="detailViagem"
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">
<rich:popupPanel id="panel" width="800" height="550">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{msgCliente['labelTituloDetViagem']}"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:commandLink value="[#{msgBotoes['labelFechar']}]" id="hidelink">
<rich:componentControl target="panel" operation="hide"/>
</h:commandLink>
</h:panelGroup>
</f:facet>
<table style="border:thin;" border="1" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#{msgGeral['corDetalheCampo']}">
<h:outputText value="#{msgCliente['consViagens.det.labelNumero']}: "/>
</td>
<td align="center">
<h:outputText value="#{item.numero}"></h:outputText>
</td>
<td bgcolor="#{msgGeral['corDetalheCampo']}">
<h:outputText value="#{msgCliente['consViagens.det.labelNumConhec']}: "/>
</td>
</tr>
</table>
</rich:popupPanel>
<h:commandLink value="#{item.numConhec}" id="link">
<rich:componentControl target="panel" operation="show"/>
</h:commandLink>
</f:subview>
<f:facet name="footer"><h:outputText value="" /></f:facet>
</rich:column>
<rich:column width="60px" id="numNFAtual" styleClass="alignCenter">
<f:facet name="header"><h:outputText styleClass="headerText" value="#{msgCliente['consViagens.table.labelNumNF']}" /></f:facet>
<h:outputText value="#{item.numNF}" />
<f:facet name="footer"><h:outputText value="" /></f:facet>
</rich:column>
<rich:column width="70px" id="dataEmissao" styleClass="alignCenter">
<f:facet name="header"><h:outputText styleClass="headerText" value="#{msgCliente['consViagens.table.labelDataEmissao']}" /></f:facet>
<h:outputText value="#{item.dataEmissao}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText>
<f:facet name="footer"><h:outputText value="" /></f:facet>
</rich:column>
<rich:column width="60px" id="codFaturaSaldo" styleClass="alignCenter">
<f:facet name="header"><h:outputText styleClass="headerText" value="#{msgCliente['consViagens.table.labelFatura']}" /></f:facet>
<h:outputText value="#{item.codFaturaSaldo}" />
<f:facet name="footer"><h:outputText value="" /></f:facet>
</rich:column>
<rich:column width="350px" id="clRemet">
<f:facet name="header"><h:outputText styleClass="headerText" value="#{msgCliente['consViagens.table.labelClRemet']}" /></f:facet>
<h:outputText value="#{item.clRemet.nome}" />
<f:facet name="footer"><h:outputText value="" /></f:facet>
</rich:column>
<rich:column width="350px" id="clDest">
<f:facet name="header"><h:outputText styleClass="headerText" value="#{msgCliente['consViagens.table.labelClDest']}" /></f:facet>
<h:outputText value="#{item.clDest.nome}" />
<f:facet name="footer"><h:outputText value="" /></f:facet>
</rich:column>
<f:facet name="footer">
<rich:dataScroller id="ds" renderIfSinglePage="true" for="table"/>
</f:facet>
</rich:dataTable>
</p>
</h:form>
</rich:panel>