No, the fact that you see some problems with listviews not reusing their
components on the user list, is not a sign that it is flawed. I see that as
a confirmation that 99% of our users *don't* have problems with the listview
the way it is currently setup.
And according to me you are the first person in a while to encounter such a
thing...

As for the warning, I don't think we can improve much with this big warning
in the 
JavaDoc<http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/markup/html/list/ListView.html>
:

WARNING: though you can nest ListViews within Forms, you HAVE to set the
setReuseItems property to true in order to have validation work properly. By
default, setReuseItems is false, which has the effect that ListView replaces
all child components by new instances. The idea behind this is that you
always render the fresh data, and as people usually use ListViews for
displaying read-only lists (at least, that's what we think), this is good
default behavior.
However, as the components are replaced before the rendering starts, the
search for specific messages for these components fails as they are replaced
with other instances. Another problem is that 'wrong' user input is kept as
(temporary) instance data of the components. As these components are
replaced by new ones, your user will never see the wrong data when
setReuseItems is false.

Martijn

On 1/17/08, Jan Kriesten <[EMAIL PROTECTED]> wrote:
>
> Hi Martin,
>
> > Again, what you are doing is a corner case. The default for listview
> > is to show data which updates automatically when refreshed if the
> > model provides an updated list. This is the way it is intended,
> > designed and documented.
>
> I have seen the 'Warning' sign on ListView - no question. And I did quite
a few
> things with ListView.
>
> The logic I'm missing: You expect ListView being used (mostly) for
read-only
> lists. When lists are read-only, why can't those entries being reused?
>
> In fact, in the case I described, the list being used was stable, the
containing
> Panels just were ajaxified (they contained ListViews as well).
>
> Since there are regularly questions with IRC as well as on the List
(mostly
> concerning ListViews with Forms I admit), the default seems not to fit
> expectations in many situations. I was well aware of the Form-problems
with
> listview, but that it would break fallback-behavior I really missed (I now
would
> have this in mind, too, of course).
>
> best regards, --- jan.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

Reply via email to