Philipp,

I'm not sure I have fully understood what you are after but it may be that
something as straight forward as making the component to be added (ADDT)
invisible - setVisible(false) - when first added to its parent (eg the page)
and making it visible in your AjaxLink (AL) onClick implementation.

Don't forget to setOutputMarkupPlaceholderTag(true) as well as
setOutputMarkupId(true) on your ADDT and to add the ADDT to the
AjaxRequestTarget - target.addComponent(myADDT) - in that onClick method.

Regards - Cemal
http://www.jWeekend.co.uk jWeekend 


Philipp Daumke-2 wrote:
> 
> 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 find anything.
> 
> I appreciate your help or just a few links to some examples!
> All the best
> Philipp
> 
> To make a silly example, I look for something like:
> 
> class1
> ....
> AjaxLink link = new AjaxLink("link", new PropertyModel(obj, "id"))
>         {
>             public void onClick(AjaxRequestTarget target)
>             {
>                     getComponent("myAjaxDefaultDataTable").render();
>             }
>         };
> ...
> 
> class2
> ...
>             add(new 
> AjaxFallbackDefaultDataTable("myAjaxDefaultDataTable", columns, 
> relationProvider, 20)
>             {
>                 {
>                     setOutputMarkupId(true);
>                 }
>             });
> -- 
> 
> Averbis GmbH
> c/o Klinikum der Albert-Ludwigs-Universität
> Stefan-Meier-Strasse 26
> D-79104 Freiburg
> 
> Fon: +49 (0) 761 - 203 6707
> Fax: +49 (0) 761 - 203 6800
> E-Mail: [email protected]
> 
> Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
> Sitz der Gesellschaft: Freiburg i. Br.
> AG Freiburg i. Br., HRB 701080
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to