i still think (we need that method anyway) that
parent.switchParent(IMoveable child) is better. (or what ever you wanna call it)
It is compile save, instead of runtime
and then it is just a marker and they don't have to implement moveTo()
(which is an internal thing in the end anyway)

And people can see the api and know and learn it that they can movething by looking at the api
instead of just having just an interface somewhere

johan


On 9/8/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
I get it now. By default such moving is not even supported - you can
create a new component for a parent or reattach older ones. However,
there are some case where you want to be able to move components to
new parents, e.g. gridview with item reuse == true. As the markup of a
component is relative to it's parent, the 'new' markup may differ in a
way that changes the meaning of the component if it was constructed
with that new markup. So it must have some way of re-initializing/
checking it's state when it is attached to another parent.

I'm +1 on
'2) only allow components that want to be moved to be movable - that
means we dont provide a public api for moving and do something like
this:

protected Component.switchParent(MContainer newparent) { if
(!(isntanceof IMovable)) { throw new exception...} do the parent
switching stuff; onMoved(); }}
interface IMovable { void moveTo(MContainer newparent); void onMoved();}'

Eelco

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to