1) Add a scroll bar to the table
<Div style = "overflow: Auto: width = 100%; Height: 200px;">
<H: datatable...>
<H: column...>
...
</H: column>
</H: datatable>
</Div>
2) Add a tab
1 page
<H: datatable id = "timezones" value = "# {BB. Data}" Var = "row" rows = "10">
<H: column>
<H: selectbooleancheckbox value = "{BB. Dummy}" onchange = "Submit ()"/>
</H: column>
<H: column>
<H: outputtext value = "# {row}"/>
</H: column>
</H: datatable>
<Corejsf: pager datatableid = "timezones" styleclass
= "Commonpage
"
Showpages = "10" selectedstyleclass
= "Currentpage
"/>
2. CSS
. Currentpage
{
Color: red;
Background: yellow;
}
. Commonpage
{
Color: black;
}
3 render custom
Control pagination styles
.
Pagerrendere. Java
Integer A = (integer) component. getattributes (). Get ("showpages ");
Int showpages = (a = NULL? 0: A. intvalue ());
String styleclass
= (String) component. getattributes (). Get ("styleclass
");
String selectedstyleclass
= (String) component. getattributes (). Get ("selectedstyleclass
");
(I = currentpage )? Selectedstyleclass: styleclass;
3 backingbean
Private string [] DATA = java. util. timezone. getavailableids ();
Attachment: csdn space 6/pager2.rar
(Javax. El package is in javaee. Jar)