The dataPaginator component is used in conjunction with a dataTable. The dataPaginator may be used to render a set of page navigation facets and access attributes of the underlying DataModel specified in the associated dataTable. Using the dataPaginator, a dataTable containing a large DataModel can be viewed as multiple "pages" of table rows instead of as one large table.
The dataPaginator component can be used to provide a
more
manageable, performant view into a large DataModel.
The following code shows how to create a basic
dataPaginator
component similar to above example:
<ice:dataTable id="data"
var="car"
value="#{scrollerList.list}"
preserveDataModel="true"
rows="10" >
<ice:column>
<f:facet name="header">
<ice:outputText value="Id" />
</f:facet>
<ice:outputText value="#{car.id}" />
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="Type" />
</f:facet>
<ice:outputText value="#{car.type}" />
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="Label" />
</f:facet>
<ice:outputText value="#{car.color}" />
</ice:column>
</ice:dataTable>
<ice:panelGrid columns="1" styleClass="scrollerTable2" columnClasses="standardTable_ColumnCentered" >
<ice:dataPaginator id="scroll_1"
for="data"
fastStep="10"
pageCountVar="pageCount"
pageIndexVar="pageIndex"
paginator="true"
paginatorMaxPages="9"
>
<f:facet name="first" >
<ice:graphicImage url="css/xp/css-images/arrow-first.gif" style="border:none;"/>
</f:facet>
<f:facet name="last">
<ice:graphicImage url="css/xp/css-images/arrow-last.gif" style="border:none;" />
</f:facet>
<f:facet name="previous">
<ice:graphicImage url="css/xp/css-images/arrow-previous.gif" style="border:none;" />
</f:facet>
<f:facet name="next">
<ice:graphicImage url="css/xp/css-images/arrow-next.gif" style="border:none;" />
</f:facet>
<f:facet name="fastforward">
<ice:graphicImage url="css/xp/css-images/arrow-ff.gif" style="border:none;" />
</f:facet>
<f:facet name="fastrewind">
<ice:graphicImage url="css/xp/css-images/arrow-fr.gif" style="border:none;" />
</f:facet>
</ice:dataPaginator>
<ice:dataPaginator id="scroll_2"
for="data"
rowsCountVar="rowsCount"
displayedRowsCountVar="displayedRowsCountVar"
firstRowIndexVar="firstRowIndex"
lastRowIndexVar="lastRowIndex"
pageCountVar="pageCount"
pageIndexVar="pageIndex"
>
<ice:outputFormat value="{0} Cars found, displaying {1} cars, from {2} to {3}. Page {4} / {5}" styleClass="standard" >
<f:param value="#{rowsCount}" />
<f:param value="#{displayedRowsCountVar}" />
<f:param value="#{firstRowIndex}" />
<f:param value="#{lastRowIndex}" />
<f:param value="#{pageIndex}" />
<f:param value="#{pageCount}" />
</ice:outputFormat>
</ice:dataPaginator>
</ice:panelGrid>
|
tag-name:
|
<ice:dataPaginator>
|
|
tag-class:
|
com.icesoft.faces.component.datapaginator.DataPaginatorTag
|
|
component-class:
|
com.icesoft.faces.component.datapaginator.DataPaginator
|
|
component-type:
|
com.icesoft.faces.DataScroller
|
|
component-family:
|
javax.faces.Panel
|
|
renderer-class:
|
com.icesoft.faces.component.datapaginator.DataPaginatorRenderer
|
|
renderer-type:
|
com.icesoft.faces.DataScroller
|