Dan Syrstad-2 wrote:
>
> Nope. I tried detach() too and that doesn't work - the test still fails. I
> had to write my own method which was basically was a copy of the old
> Page.detachModels() code.
>
> The thing is that In beta3, Page now just acts like a Component as far as
> detachModels() is concerned and Component.detachModels()/detach() does
> notdetach all of the child models.
> Component.detach(), in fact, calls detachChildren() which is an empty
> method.
>
detachChildren() is overriden by MarkupContainer which does detach its
children
(see below). So there must be something wrong with your unit test.
void detachChildren()
{
// Loop through child components
final Iterator iter = iterator();
while (iter.hasNext())
{
// Get next child
final Component child = (Component)iter.next();
// Call end request on the child
child.detach();
}
super.detachChildren();
}
--
View this message in context:
http://www.nabble.com/Page.detachModels%28%29-not-working-like-it-used-to-tf4549247.html#a13000103
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]