Hi,

I am quite a new Wicket user and have to agree with Igor. I found ListView always a bit 'magical' confusing. I do not realy understand wheter I've to keep my list (indexed) stable between calls and in case of DB backed lists how to do that. If I want to provide a custom model which methods of list are used etc. Do I even have to store my list in session etc.

In the end it took me quite some time that there is a method on ListView to overwride. Still it seems quite unatural to first provide a model and than to change the component just to adjust the provided model.

Further it is most often more easy to provide a model from a list than a list from a model. List is a 20+ method interface, which is in case you do not know AbstractList or want to provide something more performent no way easy to implement. (After you got the concept of models Swing with ListView is realy easy).

To me Igors proposal is much more clear. It states clearly what ListView needs - or better does not need. It doesn't need an extend, where I always think twice if I do not know the superclass very well and it it is easy to implement. Writing a wrapper around a real List is very easy if it is not already provided from the framework.

Just my new user thougts,
Christian

On Mon, 25 Jul 2005 08:57:14 -0700, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

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

Ok didn't know you would use that method to get a listitem model.

But this you already can make on youre own that's no problem at all.
Just subclass ListView once and make youre own IModel
definition/implementation for that ListView And youre IModel
definition has that getListItemModel() method override the
getListItemModel() of listview. Cast to youre Model and call it.

You are right I can do that no problem.
What I was trying to achieve in all these discussions is to create a
simpler/standard/non-list-dependent/more user-aware way to do this because I
thought other people would have the same problem and thus would need a
similar solution. However, since no one chimed in on this, I guess I am
alone. So, maybe, the best solution is for me to roll my own version of
listview that works how I want it to and leave the framework default as it
is since it looks like it works for most people.

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



--
Christian Essl
        

        
                
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to