On Sat, 16 Feb 2008, Igor Vaynberg wrote: > havent really had a chance to take a detailed look yet. also we havent > discussed it as a team and agree on what the api should look like. i > would also like broadcast to be on component...
OK, I made another version of the patch where the broadcast method is directly in Component https://issues.apache.org/jira/browse/WICKET-1312?focusedCommentId=12569657#action_12569657 For me it would have been cleaner design to just make an EventBroadcaster field in Component, use it to implement the method, and inject the field with a mock of something for testing. But I thought that you want to guard against any additional fields in all Component objects for memory optimisation. So I prematurely optimised the method in Component to delegate to a static method in EventBroadcaster. Testability must be ensured somehow and the current way is maybe not the most eloquent in the world, but it works. Looking forward to your comments and critique! Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oy <URL: http://www.ri.fi/ >
