Why don't you write in your panel: void addToField(Behavior b) {...}? There is no need to corrupt the meaning of Wicket methods ;)
Regards, Erik. Alberto Bueno schreef: > Hi, > > I want to overwrite the add(IBehavior) method of the component, but this > method is final. > I want to use the same idea of AlternateParent when we add a new component. > I have a panel, and I want to add a behavior in the panel, but the > behavior is used in a field > component that is in the panel. > > I don't want to say: > panel.get("myField").add(new MyBehavior()); > > I want to say: > > panel.add(new MyBehavior()); > > and in the add() method of the panel say: > > public Component add(final IBehavior behavior) > { > get("myField").add(behavior); > } > > Any idea to implement this functionality? > > Thanks > -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ ------------------------------------------------------------------------- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user