igor.vaynberg wrote:
> 
> On 8/23/07, somethingRandom <[EMAIL PROTECTED]> wrote:
>> What's the easiest way to take an arraylist of objects and display them
>> in
>> a
>> sortable, pageable table?
> 
> 
> class mydataprovider extends sortabledataprovider {
> abstract List getList(String sortcol, boolean asc) { // implement this
> yourself and return the properly sorted list }
> imodel model(object o) { // implement yourself }
> 
> int size() { return getList(getSort().getProperty(),
> getSort().isAsc()).size(); }
> iterator iterator(int first, int count){ return
> getList(getSort().getProperty(), getSort().isAsc()).sublist(first,
> first+count); }
> }
> 
> just one small class looks like to me
> 
> -igor
> 

That is much more concise than any examples I've seen before.

Thank you very much. 
-- 
View this message in context: 
http://www.nabble.com/-newb--sorting%2C-paging-table-tf4319230.html#a12304212
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to