Good wicket patterns

2008-05-08 Thread gurgel2
icket i tend to call methods on dependent components from ajax event handlers. Is this a good approach - (it atleast dont feel so good)? -- View this message in context: http://www.nabble.com/Good-wicket-patterns-tp17139005p17139005.html Sent from the Wicket - User mailing list a

Re: Good wicket patterns

2008-05-08 Thread Scott Swank
> Ajax > > 3. Now im working with more Ajax. What is a good inter component > communication scheme? Swing has its listeners, but in wicket i tend to call > methods on dependent components from ajax event handlers. Is this a good > approach - (it atleast dont feel so good)? I try to have my co

Re: Good wicket patterns

2008-05-08 Thread Scott Swank
e.g. public class AjaxEvent { private Set listeners = new HashSet(); public void register(Component listener) { listeners.add(listener); } public void fire(AjaxRequestTarget request) { for (Component listener : liste

Re: Good wicket patterns

2008-05-09 Thread Frank van Lankvelt
You could have a look at the "broadcaster" that is discussed in https://issues.apache.org/jira/browse/WICKET-1312 The solution that is proposed there uses a visitor instead of registration. That has the advantage that you don't have to _unregister_ at the appropriate time. Because Wicket does no

Re: Good wicket patterns

2008-05-09 Thread gurgel2
> Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 > San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA > 94952-3329 +1 (707) 773-4646 > -

Re: Good wicket patterns

2008-05-09 Thread Johan Compagner
ith more Ajax. What is a good inter component > communication scheme? Swing has its listeners, but in wicket i tend to call > methods on dependent components from ajax event handlers. Is this a good > approach - (it atleast dont feel so good)? > > > -- > View this message in cont

Re: Good wicket patterns

2008-05-11 Thread gurgel2
its listeners, but in wicket i tend to >> call >> methods on dependent components from ajax event handlers. Is this a good >> approach - (it atleast dont feel so good)? >> >> >> -- >> View this message in context: >> http://www.nabble.com/Good-wicket-

Re: Good wicket patterns

2008-05-11 Thread Johan Compagner
bel(...,obj.toString) > >> take > >> lists-of-objects. Or, is more advisable to keep a component's model > >> contained within itself? I have yet to find a good practice here. > >> > >> Ajax > >> > >> 3. Now im working with m