On 1/4/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> you can do this with IBehavior, just add onattach/ondetach to it. However, I see IBehavior more as a plugin for external visible effects. And it would break api quite a bit :-)
well, all this work is going into the 2.0 branch anyways. and ive been meaning to add onattach/ondetach to behavior for a while anyways, these two methods are very useful.
Or find a way of doing these things in a way that avoids this discussion altogether. If we can remove the onAttach/onDetach methods in Component, wouldn't that be a solution? Just exploring the space here, not taking a position. We could call the feature "Wicket now uses closures for lifecycle methods"
ahh, but then you are back to the exact same problem. how do you override behavior that was added via an anonymous ILifecycleListener (or whatever you call it) :) the solution is the same as for the current onattach() problem, and for annotations approach - behavior that is meant to be overridable needs to be factored out into a separate method. -igor Martijn
