Datascroller doesn´t work
paulo.hakme Feb 22, 2008 2:03 PMDear friends,
I am using richfaces 3.1.4 and I got a problem with datascroller and couldn´t find the solution.
The datascroller and the datatable are shown ok, but when I click at one page number at the datascroller it doesn´t rerender the datatable with the data off that page.
If the page submit for any reason (by clicking at a link) it refreshs the datatable.
I am missing anything?
Thaks for any help.
Paulo Hakme
The code is:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@include file="/inc/top.jsp"%>
<f:view>
<%@include file="/inc/menu.jsp"%>
<h:form id="form1">
<h:messages globalOnly="false" errorClass="error" infoClass="info" />
TÃÂtulos
<h:panelGrid columns="3">
<h:outputText styleClass="frmlabel" value="Data de Vencimento" />
<h:selectOneMenu id="operVencimento"
value="#{tituloService.operadorVencimento}">
<f:selectItems value="#{tituloService.operadores}" />
</h:selectOneMenu>
<rich:calendar id="dataVencimento"
value="#{tituloService.dataVencimento}" popup="true"
datePattern="dd/MM/yyyy" showInput="true" enableManualInput="true"
oninputkeypress="MaskData(this)" />
<h:outputText styleClass="frmlabel" value="Data de Pagamento" />
<h:selectOneMenu id="operPagamento"
value="#{tituloService.operadorPagamento}">
<f:selectItems value="#{tituloService.operadores}" />
</h:selectOneMenu>
<rich:calendar id="dataPagamento"
value="#{tituloService.dataPagamento}" popup="true"
datePattern="dd/MM/yyyy" showInput="true" enableManualInput="true"
oninputkeypress="MaskData(this)" />
<h:outputText styleClass="frmlabel" value="Historico" />
<h:inputText styleClass="frmText"
value="#{tituloService.historico}" />
<h:outputText styleClass="frmlabel" value="" />
<h:outputText styleClass="frmlabel" value="Ordenar por:" />
<h:selectOneMenu id="ordem" value="#{tituloService.ordem}">
<f:selectItems value="#{tituloService.ordens}" />
</h:selectOneMenu>
<h:outputText styleClass="frmlabel" value="" />
<h:commandButton action="#{tituloService.find}"
image="/images/delete.png" />
<h:commandButton action="#{tituloService.cleanFilter}"
image="/images/delete.png" />
<rich:spacer height="30"/>
<h:commandLink action="#{tituloService.prepareForInsert}">
<h:outputText styleClass="headerText" value="Inserir novo tÃÂtulo" />
</h:commandLink>
</h:panelGrid>
<c:if test="${sessionScope.tituloService.filtered}">
<rich:datascroller for="tituloList" align="center" maxPages="20"/>
<rich:spacer height="30" />
<rich:dataTable width="483" id="tituloList" rows="10"
value="#{tituloService.titulos}" var="_titulo">
<rich:column id="id">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Identificação" />
</f:facet>
<h:commandLink value="#{_titulo.id}"
action="#{tituloService.prepareForDetail}" />
</rich:column>
<rich:column id="numDocumento">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Num. Documento" />
</f:facet>
<h:outputText value="#{_titulo.numDocumento}" />
</rich:column>
<rich:column id="emissao" sortable="true"
sortExpression="#{_titulo.dataEmissao}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Data de Emissão" />
</f:facet>
<h:outputText value="#{_titulo.dataEmissao}"
converter="javax.faces.DateTime" />
</rich:column>
<rich:column id="vencimento" sortable="true"
sortExpression="#{_titulo.dataVencimento}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Data de Vencimento" />
</f:facet>
<h:outputText value="#{_titulo.dataVencimento}"
converter="javax.faces.DateTime" />
</rich:column>
<rich:column id="pagamento" sortable="true"
sortExpression="#{_titulo.dataPagamento}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Data de Pagamento" />
</f:facet>
<h:outputText value="#{_titulo.dataPagamento}"
converter="javax.faces.DateTime" />
</rich:column>
<rich:column id="valor" sortable="true"
sortExpression="#{_titulo.valor}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Valor" />
</f:facet>
<h:outputText value="#{_titulo.valor}" />
</rich:column>
<rich:column id="grupo">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Grupo" />
</f:facet>
<h:outputText value="#{_titulo.grupo.descricao}" />
</rich:column>
<rich:column id="conta">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Conta" />
</f:facet>
<h:outputText value="#{_titulo.conta.descricao}" />
</rich:column>
<rich:column id="historico">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Histórico" />
</f:facet>
<h:outputText value="#{_titulo.historico}" />
</rich:column>
<rich:column id="edit">
<f:facet name="header">
<h:outputText styleClass="headerText" />
</f:facet>
<h:commandButton action="#{tituloService.prepareForEdit}"
image="/images/edit.png" />
</rich:column>
<rich:column id="delete">
<f:facet name="header">
<h:outputText styleClass="headerText" />
</f:facet>
<h:commandButton action="#{tituloService.delete}"
image="/images/delete.png" />
</rich:column>
</rich:dataTable>
</c:if>
</h:form>
</f:view>
<%@include file="/inc/bottom.jsp"%>