• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsf rich:datascroller and rich:dataTable that has been paginated should show the start and end recor

 
farnaz khan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a rich:dataTable and rich:datascroller. It is paginated.

<rich:dataTable width="400px" cellspacing="2" cellpadding="2" headerClasses="center" id="recordList" var="recordList" styleClass="dataTableNoMargin" value="#{AuditTrail.record}" binding="#{table}" rows="25">
<rich:datascroller for="recordList" styleClass="skin_scoller" id="scroller"/>

I have to display the start and end record index number of the current page. For example, If there are 60 records returned, then I want to display following text 1-25 on first page 26-50 on second page 51-60 on third page.
 
sriram Ganapathi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You can use pagination template in your data table and also specify the number of row need to display per page using rows

like

<rich:dataTable id="list"
value="#{}" var="varname"

paginator="true"
paginatorTemplate=" {CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="25,50,75,100"[b] rows="25"[/b] />
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic