Take for example a session list. I would make a nice component to have a list of currently logged on sessions. What you need for that is implement a session listener that keeps a list of logged on users, an IModel that knows where to get the session list, and a component (a ListView) that renders them. With a truely dynamic list, it's easy to develop such a component; you do not need to know anything else (like what page it's in etc.). So, a user of such a component can just add the component to a page, and that's it. No need to couple listeners or anything else. Without a dynamic list, however, that user additionally has to know about how/ when to update such a component, or e.g. it must be coupled to the session listener (yech) or some similar hack.
For another example, take a look at the feedbackpanel/ UImessages. I build some basic messaging in cdapp (like cd saved and the number of results found), but once a message is rendered, it's never replaced by a new one. And that's just wrong, as it does not represent the current state of the model. If I would have used a multiline label for instance, this would work, so consistency is a problem here as well.
So, a static list *will only work* when you have full controll and knowlegde! about the model that is used. I can come up with many more cases like the two above where this is not the case/ not what you want.
Regards, Eelco
Juergen Donnerstag wrote:
Maybe I don't understand the problem, but why don't you call ListView.invalidateModel(). It'll remove all ListItem components (children of ListView) and thus forces re-rendering all items and thus supporting dynamic table content. This is how the library examples works.
regards Juergen
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Wicket-develop mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Wicket-develop mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
