i think there are some issues here, but i don't fully recall what i was worried about.
one problem is cycles. if we allow this we should do cycle detection (if isDescendant(parent)) and throw an IllegalArgumentException if we find one.
i'm concerned that there might be state/rendering issues somehow...
i'm +1 if cycles are the only problem...
Johan Compagner wrote:
yes i already stumbled across it with Container.replaceComponent() Then i had to work around it but if it can b e removed +1 by me
Eelco Hillenius wrote:
Why is it important that a parent, once set, may never be changed?
final void setParent(final Container parent)
{
if (this.parent == null || parent == null)
{
this.parent = parent;
}
else
{
throw new IllegalStateException(exceptionMessage("Cannot change parent once set"));
}
}
I have a concrete usecase, where I remove and recreate all childs of a border, except - as I work with a menu-like component - for a 'current' panel, that I just want to re-add.
I'd like to propose:
final void setParent(final Container parent) { this.parent = parent; }
Objections anyone?
Eelco
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
