[jboss-user] [JBoss Seam] - Partial load of data for DataTable

gvl do-not-reply at jboss.com
Mon Aug 7 10:34:33 EDT 2006


I am using JBoss 4.0.4, ejb38, myfaces 1.1.3 and tomahawk 1.1.3 and ofcourse Seam  1.0.1

I have a data table that loads from a large table. What I would like to do is only load the rows that are currently visible by the data scroller page. I can see two ways of doing this:

1) Use a custom made data model (as in http://wiki.apache.org/myfaces/WorkingWithLargeTables) where I would only load the data as per page and bind that to the data table tag instead of the list of entities that are set now in the value attribute. However I'm not sure how this will interact with Seam, especially the DataModel tag, which as I understand it requires a List of entities to work with and the DataModelSelection tag.

2) The other way is to provide a custom made data scroller. In this case only one page of data will be read from the database per time and set as the list of entities that Seam expects for the DataModel, then I'll use an action listener to receive events when the user selects a page to view or scrolls by using the arrows and so I'll know which part of data I need to read from the database. The role of the custom data scroller will be then to return the total number of rows of the table in the database (instead of the number of rows shown) and the resulting number of pages.

Has anyone looked at this? I would appreciate any ideas or even some example code :-)

--
George


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963592#3963592

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963592



More information about the jboss-user mailing list