Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination in JSF

 
george john
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some one tell me how to do pagination in JSF.Are ther in built components for doing pagination in JSF. If possible provide me with some sample codes too. Its really urgent. Please help me out. Thanks in advance!!!
 
Darryl Nortje
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howzit George,

I stand to be corrected, but I think dataTable has pagination built into it, using the rows attribute. Maybe you can look at how that works. Let me know if it helps.
 
Darryl Nortje
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
looks like it can be used hand in hand with tomahawk's dataScoller.
 
Arun Sudharsanam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can also try trinidad tags for this:
<tr:table rows="3">
<tr:column>
<trutputText value="#{Bean.name}"
</tr:column>
</tr:table>

This will make the table display only 3 values at a time and the remaining values will be displayed only after clicking the 'next' link which is defaultly displayed.
 
Thiru Navukkarasan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If you use database by Hibernate then use following methods for pagination

criteria=criteria.setFirstResult(first);
setMaxResults(max);

Hibernate supports pagination by above methods .

--Thiru N
 
Kranthi Kondapaka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i think we can go for rich:datascroller for pagination in jsf.
here is the url for reference
http://livedemo.exadel.com/richfaces-demo/richfaces/actionparam.jsf?c=actionparam
 
yuvaraaj mohan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
Is it possible to create customised messages near the drop down?. i mean instead of 'Next 1' and 'Previous 1', we need some other message to be shown there.

TIA,
Yuvaraj.
 
suresh dasari
Ranch Hand
Posts: 121
Chrome Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl,

you can use extended datatabe provided by ibm-jsf to achieve pagination.
there are many combinations, you can use pagination with scrollbar, only scrollbar, only pagenation etc.
its a hx component looks like
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic