Hi James, I like the idea of having a way of automatically includes components in the AjaxRequestTarget without the need to do it explicitly (target.add(..)), by using a Marking Interface and the Visitor, it really would make things easier when you want to add a new component to the current Ajax Response.
The idea of the DynamicProxy seems very promising and i thinks it something way much better of having Pub/Sub event implementation. Just my +0.05 cents :) On Wed, Aug 25, 2010 at 9:11 AM, James Carman [via Apache Wicket] < ml-node+2338119-2003757039-65...@n4.nabble.com<ml-node%2b2338119-2003757039-65...@n4.nabble.com> > wrote: > What about if we modify this idea a bit? What if we use dynamic > proxies to make it more generic? So, your onclick method would look > like: > > public void onClick(AjaxRequestTarget target) { > fire(MyCustomEventListener.class).someAjaxEvent(target); > } > > Then, the fire() method would return an object (a dynamic proxy) that > implements the MyCustomEventListener interface. The method > implementation would do the visitor thing by looking for all > components implementing the MyCustomEventListener interface and then > call the someAjaxEvent() method. > > On Wed, Aug 25, 2010 at 5:10 AM, vladimir.kovalyuk <[hidden > email]<http://user/SendEmail.jtp?type=node&node=2338119&i=0>> > wrote: > > > > > I don't like subscriptions implementation. Somewhen it becomes difficult > to > > realize when to add/remove observers. It depends on the order of > > instantiations. Visitor pattern seems to be much more reliable. > > -- > > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Best-practice-for-component-interaction-tp2336888p2337874.html<http://apache-wicket.1842946.n4.nabble.com/Best-practice-for-component-interaction-tp2336888p2337874.html?by-user=t> > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [hidden > > email]<http://user/SendEmail.jtp?type=node&node=2338119&i=1> > > For additional commands, e-mail: [hidden > > email]<http://user/SendEmail.jtp?type=node&node=2338119&i=2> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=2338119&i=3> > For additional commands, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=2338119&i=4> > > > > ------------------------------ > View message @ > http://apache-wicket.1842946.n4.nabble.com/Best-practice-for-component-interaction-tp2336888p2338119.html > To unsubscribe from Apache Wicket, click > here<http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>. > > > -- Sincerely, JC (http://www.linkedin.com/in/jcgarciam) Work smarter, not harder!. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Best-practice-for-component-interaction-tp2336888p2338205.html Sent from the Wicket - User mailing list archive at Nabble.com.