i guess the problem here is the fact that the index of the list is not a stable id. what about using a map and keying off a counter. you can also sort the map on the counter so the order will be just like a list.

-Igor


On 12/14/05, Laurent PETIT <[EMAIL PROTECTED]> wrote:
I'm not sure we're talking about the same thing. But as I understand
what you suggest: if I rebuild the models & the Items, then I'll loose
the inputs the user has already done on the Form Components. And if I
keep the Items but rebuild the models, then there is a risk of having
an Item, initialized with an object A of the list, referencing (after
a list insert or delete, for example) an object B.

I'll try to make a test case for that, it'll then become clearer. (And
it will help me clarify my mind altogether ;)



On 12/14/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> why not just rebuild the models if one or more are deleted?
>
> -Igor
>
>
> On 12/13/05, Laurent PETIT <[EMAIL PROTECTED] > wrote:
> >
> > Igor,
> >
> > thanks for your answer.
> >
> > On 12/14/05, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > as far as the models go, maybe what you can do is make a "detachable"
> model
> > > that instead of the identity keeps the index of the list. so when you
> call
> > > getobject() on it it will retrieve that object from the list by its
> index.
> >
> > Unfortunately, this is not so straighforward. It was my first thought,
> > and I did implement it that way in a first attempt. But, as I said in
> > another post to this same thread, I had problem because storing the
> > index does not suffice because if the list model is changed by a call
> > to my "Delete banana" button, then I will have strange results if the
> > deletion does occur at any place but the last entry of my list.
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to