Hi,

You're right that ListItems are generated (populated) for each
request, but the underlying model of ListView (a List) and thus the
ListItems models (specific item of the List) stays the same. And the
model is where you keep your state.
hmm, I think this is a bit different from other Wicket components, because as long as you're not using a list, the components itself have a state and not only the model of the component. So I can call setCaption on a label and I still have this caption the next request. But when calling setCaption on a label in a list, this is not available in the next request because the items got re-populated. Why not offering a possibility to reuse the components which have been generated in the last request cycle? I thought it's ok to encapsulate this kind of view related state information in the component class itself and use the model only for the real model data not related to view details? For my example (just to make sure I got the idea), I would have a model object containing the business data model object and an additional boolean property for saving the collapsed state so when the list is populated I can set the visibility?

Regards,
Ralf


-------------------------------------------------------
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