Error using reRender in a scrollableDataTable
rogeriopaguilar Oct 27, 2007 8:43 AMI'm getting an error when I use the attribute reRender of a a4j:commandButton to rerender a scrollableDataTable. When I change the scrollableDataTable to dataTable everything works. When I use the scrollableDataTable the request is made and the body of table is renderized, but the captions for the columns (first line of the table) isn't renderized and a javascript error occurs. You can say the example in code below (the scrollableDataTable is in a comment section). Does anyone know if it is a bug from richFaces or I'm doing something wrong?
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<ui:composition template="layout.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
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:c="http://java.sun.com/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:bp="http://java.sun.com/blueprints/ui/14"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:define name="content">
<a4j:form ajaxSubmit="true">
Código: <h:inputText value="#{teste.grupoSearchVo.grupo.codGrupoGrup}"/>
Descrição: <h:inputText value="#{teste.grupoSearchVo.grupo.descrGrupoGrup}"/>
<a4j:commandButton value="Pesquisar" action="#{teste.listarGrupos}" reRender="tabelaGrupos"/>
<!--
<rich:scrollableDataTable rowKeyVar="rkv" height="400px"
width="700px" id="tabelaGrupos" rows="20"
value="#{teste.listaGrupos}" var="grupo" sortMode="single">
-->
<rich:dataTable
width="700px" id="tabelaGrupos"
binding="#{teste.listaGrupos}" var="grupo" rows="15">
<rich:column id="codGrupo" style="width:25px;">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Código" />
</f:facet>
<h:outputText value="#{grupo.codGrupoGrup}" />
</rich:column>
<rich:column id="descrGrupoGrup">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Descrição"/>
</f:facet>
<h:outputText value="#{grupo.descrGrupoGrup}" />
</rich:column>
</rich:dataTable>
<rich:datascroller align="center" for="tabelaGrupos" maxPages="20" />
</a4j:form>
</ui:define>
</ui:composition>