tags:

views:

84

answers:

2
+1  Q: 

paging in jsf1.1

How to implement paging in JSF 1.1?

A: 

I used Richfaces Datascroller

stacker
A: 

Create a DAO class which can return subsets of results by firstrow and rowcount, create a bean which holds information about the firstrow and rowcount and the current subset of data, create a JSF page which displays the data using <h:dataTable> and has a bunch of <h:commandButton>s to invoke paging actions (just do the math based on firstrow and rowcount).

You can find more information and code examples in this article, it even covers sorting.

BalusC
Iam a beginner level of jsf .How to implement ondemand loading in paging (RichFaces)
johnbritto
For first view, load using lazy loading in getter. For next/prev/etc buttons, just reload in action method. Also see the sample bean code. But since you're using RichFaces (you should really have mentioned that in the question), go for the DataScroller component. It does the same, but only less efficiently since it by default stores everything in the memory (the session), which may be hogging slow if you've a lot of data and/or a lot of users.
BalusC
thanks for ur reply
johnbritto