RichFaces <rich:dataScroller>
This component is used for navigate through multiple pages of tables. It must be places in a facet of the table. We can also use the for attribute ro bind parent tables to the scroller. It is required to specify the limit of number of rows per page.
Style classes and skin parameters
The following table contains the Style classes and corresponding skin parameters for the dataScroller.
Class |
Function |
Skin Parameters |
Mapped CSS properties |
.rf-ds |
It is used to define styles for the data scroller. |
generalFamilyFont
generalSizeFont
|
font-family
font-size
|
.rf-ds-btn |
It is used to define styles for buttons in the data scroller. |
generalFamilyFont
generalSizeFont
|
font-family
font-size
|
.rf-ds-btn-first |
It is used to define styles for the first button. |
No skin parameters. |
|
.rf-ds-btn-fastrwd |
It is used to define styles for the fast rewind button. |
No skin parameters. |
|
.rf-ds-btn-prev |
It is used to define styles for the previous button. |
No skin parameters. |
|
.rf-ds-btn-next |
It is used to define styles for the next button. |
No skin parameters. |
|
.rf-ds-btn-fastfwd |
It is used to define styles for the fast forward button. |
No skin parameters. |
|
.rf-ds-btn-last |
It is used to define styles for the last button. |
No skin parameters. |
|
.rf-ds-nmb-btn |
It is used to define styles for page number buttons in the data scroller. |
generalTextColor
generalFamilyFont
|
color
font-family
|
.rf-ds-press |
It is used to define styles for a data scroller when a control is pressed. |
tableBorderColor
tableBackgroundColor
|
border-color
background
|
.rf-ds-act |
It is used to define styles for an active data scroller. |
tableBorderColor |
color |
.rf-ds-dis |
It is used to define styles for a disabled data scroller. |
tableBorderColor |
color |
Example
Here, in the following example, we are implementing <rich:dataScroller> component. This example contains the following files.
JSF File
// data-scroller.xhtml
Managed Bean
// StudentRecord.java
Output:
After scrolling to next, it shows other records as well.
|