That's agreed. Speed/ memory management is why I proposed to use a boolean property instead of making it the default behaviour, and I did not follow the 'extends' route, because of the discussion you had with Chris last week. Anyway, from the reactions on this list it seems I am the only one that feels strongly for default dynamic support, and as your extends proposal works just as well, I settle for that then.

Btw, removeAll(); would work better in most of my cases, as I just want to force the rendering of ListView to use the current state of the model, but I do not want the other pages that use that component to have their stale flag set.

Ok, I guess that ends this discussion. Thanks,

Eelco

Juergen Donnerstag wrote:

I haven't tested it, but I think a subclassed version of ListView can do that.

But let me bring up some points I haven't read yet. The reason why the
original and the new ListView implementation test for the existence of
the ListItem object is simply speed and memory management. Static
lists allow for this optimization.

Dynamic lists, in contrast, must never rely on anything except that it
is a list. invalidateModel() allows to remove already created ListItem
object. In the simplest case your completely dynamic ListView or Table
implementation needs to subclass handleRender like this only.

   protected void handleRender(final RequestCycle cycle)
   {
         invalidateModel();
         super.handleRender(cycle);
   }

In case I didn't miss anything, I think it is a very easy solution.
Keeping the benefits of a static list and still offering easy support
for fully dynamic models. TableNavigation might be a good example as
well, as it show how to use ListView even without any underlying list.
I sometimes refer to it as virtual list.

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

Reply via email to