Not sure about the best practice, but instead of passing a reference I use getParent or getPage methods, then find the target component by its id.
Bilgin On Tue, Aug 24, 2010 at 4:37 PM, Patrick Petermair < patrick.peterm...@openforce.com> wrote: > Hi! > > Let's say I have a page with 2 panels. CalendarPanel shows a simple > calendar, FormPanel a basic form. Whenever the user clicks on a date in the > calendar, the textfield of the form should show the selected date. > > What is the best practice for this kind of interaction? > Right now we hold a reference to the FormPanel in CalendarPanel and attach > our custom CalendarAjaxBehavior to it. Whenever the CalendarAjaxBehavior > gets a request / click, it updates the FormPanel's model directly. > > I don't really know if this is some ugly hack or if there is a better way > of different panels to update / communicate with each other - other than > holding references to one another... > > Cheers, > Patrick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >