3 Replies Latest reply on Jul 29, 2008 7:33 AM by necromancer

    Newbie Pagination Question



      I'm trying to understand how Richfaces pagination works w/Seam, so this is kind of a joint question but I think more RF than Seam.

      I have a Seam EntityQuery object feeding data to a rich:datascroller tag that has a maximum rows return set at some value, say 100 out of a total query result set of say 1000. This is the "chunk size" brought back from the db at any given time to improve efficiency.

      Ok, so now if I use the rich:datascroller tag I can easily paginate, but only through the current 100-row chunk brought back by my query. Once I get to the end of that chunk I have to go get the next chunk. RF thinks its at the end of the list and dim's the 'next' controls, when really it's just reached the end of that chunk. I don't know how to connect Richfaces and EntityQuery so that RF knows to paginate across the whole query, not just one chunk.

      Does anyone know how to link rich:datascroller and Seam's EntityQuery object so they work better together? (For example I could set the EntityQuery max at some huge value but that kills my performance. I want it to "chunk", but I want to use Richfaces to paginate across the entire query results, not just the current chunk. Make sense?)

      Thanks in advance for any pointers!