I would either add a toList method to Persons that returns the list or use the decorator pattern to wrap the person and add the list method to that wrapper. Or you could create a custom model for this (implement IModel or extend from Model) and create it in this model. And if you don't want the list to lay around when your request is over, use a detachable model.

Eelco

David Liebeherr wrote:

Hi all,

i have a class Persons which has a method getPerson(int index) and getSize() (which returns the number of Persons). Now i want to display all the Persons of the Persons Object in a ListView.
How can i make a Model that fits my environment?
The Person class does not provide any List. So i have to itterate over it with getPerson(index)...

Is there any posibilty to do that with IModel and OGNL?

Thankx,
Dave


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to