Render other components

2009-01-27 Thread Philipp Daumke
Dear all, I look for an example how to render Wicket-Components (in my case an AjaxDefaultDataTable) triggered by other Components (in my case AjaxLink). In my case the two components are defined in different Java-Classes. I looked for a while in the examples and in the wiki, but coudln't

Re: Render other components

2009-01-27 Thread jWeekend
this message in context: http://www.nabble.com/Render-other-components-tp21683298p21683659.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org

Re: Render other components

2009-01-27 Thread Philipp Daumke
Dear Cemal, thanks for your fast help. You understood what I meant but I still have the problem, that I don't know how to get the instance myADDT. I tried Page page = target.getPage(); AjaxFallbackDefaultDataTable myADDT= (AjaxFallbackDefaultDataTable) page.get(relTable); but get

Re: Render other components

2009-01-27 Thread Philipp Daumke
Hi all, I finally my error and post the working solution. I need to use a colon : to find children. AjaxLink link = new AjaxLink(link, new PropertyModel(obj, id)) { public void onClick(AjaxRequestTarget target) { Page page = target.getPage();

Re: Render other components

2009-01-27 Thread jWeekend
: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Render-other-components-tp21683298p21685308.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail

Re: Render other components

2009-01-27 Thread Jonas
Hi, I somehow doubt this is considered good practice to let one component know where in the component tree another component is situated. The code you propose breaks very easily e.g. if you introduce another container around the ADDT. Why don't you just pass the ADDT instance into the AjaxLink?

Re: Render other components

2009-01-27 Thread Philipp Daumke
Hi Jonas, hi Cemal, I think both of you mean similar things. So I need to attributes in my custom panel, one for the referring instance (in my case an instance of Class Index) and one for the component that I want to render (in my case AjaxFallbackDefaultDataTable). So my new custom panel