• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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] />
 
reply
    Bookmark Topic Watch Topic
  • New Topic