wicket uses callback methods instead of listeners for a simple reason: it is a smaller memory footprint - there is no list to store, no listener implementations to serialize. it is further my experience that you very very rarely need more then one listener, so it cannot justify the overhead imho.
-igor On 5/4/07, Bruno Borges <[EMAIL PROTECTED]> wrote:
When I've started using Wicket few months ago, I found myself wondering: why do I have to override methods instead add listeners to my component? Developing forms is quite strange to me, when I have to override the onSubmit() method. If we say "Swing-like OO Component Model", why there's no listeners and events? I say this because I'm thinking on writing a Genesis Binding <http://genesis.dev.java.net> between Genesis and Wicket, and because it's lack of listener architecture, it's impossible to do it easily. Instead, I have two options only: 1) Write subclasses for every component and base class (almost, re-write entire Wicket) like GenesisWebPage, GenesisForm, GenesisButton, GenesisThis, GenesisThat. 2) AspectWerkz. Genesis itself has AOP but the Binding component no. It has binding with SWT, Swing and Thinlet, but no for any web framework/technology. Maybe, listeners/events could resolve some other problems like that one about onFirstAttach or whatever. What you guys think? []'s -- Bruno Borges Summa Technologies Inc. www.summa-tech.com (48) 8404-1300 (11) 3055-2060