Hi Thomas!
What if i the business logic returns a custom java.util.List, that dynamically reloads data?
size() returns the total rowCount
get(i) would reload a new block of data if i is out of scope.
The List would need to know about the rows (HtmlDataScroller.rows) displayed, so that reloading can work properly.
This should work with the current implementation.
Sure, this is also possible, but then you have a rather large contract to fullfill (contains, iterator, toArray, set, remove). It isnt very nice to throw UnsupportedOperationExceptions, is it?

Personally I use a custom ListDataModel which only holds the number of records requested. The model will be recreated for each request - depending on the dataTable state.
So it isnt bad at all.

Simons solution ( http://wiki.apache.org/myfaces/WorkingWithLargeTables ) is just a bit "sexier" ;-)


PS: Yesterday was rather expensive. I wasnt aware that the whole region is a "short-term parking zone" :-( Oh boy, how I hate the physical world ;-), though, nice evening anyway.

---
Mario

Reply via email to