[jboss-user] [JBoss Seam] - Re: Using rich:datascroller With Seam and Hibernate Paginati
do-not-reply at jboss.com
Sat Feb 2 03:15:31 EST 2008
Thanks to everyone for their insight. I have got something that seems to be working. I don't know if it is the most elegant code ever written, but I will be happy to write up the general solution on SeamFramework.org. Just let me know where, Pete.
For those who might be interested, let me first point out I have three components working together:
1) An action component that interacts with the user
2) A persistence component that abstracts all the search APIs
3) My own SerializedDataModel which is bijected from my Seam action component.
The action component basically takes the search parameters from the user and passes them to the persistence component. That component returns the results to the action, which then passes them to the SerializedDataModel, which wraps the information in a HashMap by key as specified in the examples and Jason Long's code.
As for the paging, when the user wants a different page of results (either by clicking one of the navigation buttons or by clicking an actual page number), the action component uses the DataScrollerEvent passed to the listener method within to figure out where the user wants to go next. The action component passes the desired page number to the persistence component, which of course is handling all the result paging. The persistence component then passes back the results for the desired page, and we do all the data passing around I described above.
Again, I will be happy to elaborate further on SeamFramework.org since I think this will be a common issue for developers until RichFaces comes up with a better way to handle this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125746#4125746
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125746
More information about the jboss-user