« Return to Thread: Creating a BeanTable from a Collection of java beans

Re: Creating a BeanTable from a Collection of java beans

by wfaler :: Rate this Message:

Reply to Author | View in Thread

No, that will not do anything, as the propertytable gets its data from the IPropertyTableProvider implementation, more specifically it's public Iterator<IPropertyCollection> iterator(int first, int results); method.
The interface is an extension of IDataProvider which is in Wicket's core framework.
Basically when you page through a table that is pageable, as a PropertyTable, the iterator() and count() methods will be called, the count() method to see how many results there are, the iterator() method to get a subset of the result to display (for instance indexes 0 to 10).

wadi wrote:
Thanks! But I don't understand how should I set my beans collection, should I do myPropertyTable.setModel(myCollectionOfBean); ?
Thanks a lot again!
Wadi

 « Return to Thread: Creating a BeanTable from a Collection of java beans