Skip to content

Instantly share code, notes, and snippets.

@mmonge
Created March 26, 2012 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmonge/2203106 to your computer and use it in GitHub Desktop.
Save mmonge/2203106 to your computer and use it in GitHub Desktop.
Java EE 6 + RichFaces 4.2 + DataTable Parcial Render
<rich:dataTable var="v" value="#{bean.all}" id="table"
noDataLabel="No hay registros" rows="10"
styleClass="table table-striped">
<rich:column sortBy="#{v.codigo}" sortOrder="ascending"
filterValue="#{bean.codigoFilter}"
filterExpression="#{fn:containsIgnoreCase(v.codigo, bean.codigoFilter)}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Código" />
<br/>
<h:inputText value="#{bean.codigoFilter}" styleClass="input-small">
<a4j:ajax render="table@body scroller" event="keyup" />
</h:inputText>
</h:panelGroup>
</f:facet>
<h:outputText value="#{v.codigo}"/>
</rich:column>
...
<f:facet name="footer">
<h:outputFormat value="#{i18n.lista_total}">
<f:param value="#{fn:length(bean.all)}"/>
</h:outputFormat>
<br/>
<rich:dataScroller id="scroller" maxPages="5" for="table"/>
</f:facet>
</rich:dataTable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment