>> 2) in order to use primary keys we need to translate an object into a
>> pk-based model. Currently this is done by overriding a method in a
listview,
>> however, this is a horizontal concern and should be separated.

> I don't want those methods in the model. That is a -1 from me.
> I like the current way of overriding a method so that you can make you're
own ListItemModel so that you
> can decide what to store and what not.

The reason for putting this into the model is that this is a horizontal
concern and needs to be factored out. If I have two listviews on two
different pages working with a contact object why should I have to replicate
the code in both listviews?
Sure, I can subclass the listview but that would explode my hirarchy. If
this method is in the model I can just create a ContactListViewDatasource
and give that to any listview.

> If it is not clear that you can do that then we need some other way to let
you know that you can make youre own listitemmodels
The problem is that because you are providing listview with a list the
assumption/illusion is that it will be taken care for you, but its not.

>> 3) a more concrete interface makes it a lot clearer to see what is
needed.
>> Interface ListViewDatasource { List getItems(first, count); int
>> getTotalItemCount(); Imodel getObjectModel(Object o) } presents a much
>> clearer picture as to what needs to be done and how listview works.

> What does that IModel getObjectModel(Object o) do there?
> What should it return? Not clear to me.

As opposed to IModel getListItemModel(final IModel listViewModel, final int
index) ?
What exactly does index mean in a context of a database backed list? What
kind of a model does listViewModel represent?

Igor




-------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to