I tried to fix it, but may be someone with better knowledge of state changes should do it. We can not just iterate over the children and call remove() because than we would record the state change twice. remove() currently does much more than just setParent(null). Functionality which removeAll() does not have. But removeAll() uses a more efficient state change as it remembers the list containing all children. Iterating all children and registering a state change for each child is certainly less efficient.
Juergen >On 12/28/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: > No. I think you are right. We probably changed remove() sometimes > later on and didn't look at removeAll(). removeAll() should call > remove() for each child. > > Juergen > > > On 12/28/05, Laurent PETIT <[EMAIL PROTECTED]> wrote: > > Thanks for the quick answer. > > > > I've digged a little bit in the code, because now that I know what > > you've done to suppress the bug, I think the initial idea was > > interesting (throwing the exception). > > > > I saw that the bug occurs because OrderedRepeatingView calls > > super.removeAll() (i.e. MarkupContainer.removeAll()). > > > > And the problem is that MarkupContainer.removeAll() does not at all > > call remove() on each of its children ==> every children components > > keeps the pointer to its parent component. > > > > The "clean" solution would be to correct the > > MarkupContainer.removeAll() method. But it has maybe been done this > > way (just setting the children property to null) for performance > > reasons ? > > > > > > > > > > On 12/28/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > this was due to a new check we introduced. basically it would throw an > > > error > > > if you try to add a component that already had a parent set. this would > > > help > > > users catch errors in certain situtations, but obviously caused problems > > > in > > > others. > > > > > > i changed it so now the component is removed from its previous parent > > > before > > > it is added to its new one instead of throwing an error if a parent was > > > already set. > > > > > > -Igor > > > > > > > > > > > > On 12/27/05, Laurent PETIT <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello, > > > > > > > > While testing my strutsnested example before commiting it, I had the > > > > good idea to do an update (had not done one for a while, may be a week > > > > or more). > > > > > > > > My example now scratches. > > > > > > > > I investigated a little bit, and it appears that the wicket-example > > > > related to the ReuseIfModelsEqualStrategy also fails (the > > > > > > > http://localhost:8080/wicket-examples/repeater?bookmarkablePage=wicket.examples.repeater.OIRPage > > > > link) > > > > > > > > Don't know where the problem lies. > > > > > > > > regards, > > > > > > > > -- > > > > laurent > > > > > > > > > > > > ------------------------------------------------------- > > > > 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 > > > ------------------------------------------------------- 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&op=click _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user