Re: dynamic child in container
hi again, so I really dont understand how to set hings up but I tried this yesterday around midnight :] so please forgive me ... let me explain again I have simple webpage *DashboardPage* (1) then I created a panel with a form *UserFormPanel*(2) go back in *DashboardPage* I created AjaxLink for *edit* and tried to add * UserFormPanel* to requestTarget when link is clicked, but in turn wicket refused that saying the component has no outputMarkupID set to true (but it doesnt tell on which component I should set that property). the other thing is that I need to assign some wicket:id to *UserFormPanel*created in link callback. but this id does not correspond to any id in markup so I get (think I get:) an exception. how to set components right? I really cannot find anything on the web about this! is this so rare situation in wicket world??? pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __
Re: dynamic child in container
ok, but I thought that repeaters are only to repeat same component many times. but I ll check that again pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __
Re: dynamic child in container
That's what I thought you meant (ajax). If you want to add a dynamic number of components during normal page construction, you should have a look at wicket repeaters, e.g. RepeatingView. There are plenty examples for how to use those. On Tue, 29 Mar 2011 17:28 +0200, "kamiseq" wrote: thanks, so I understand that it is only possible with AJAX calls. could I make a link callback that will add random number of components on each request? there will be no wicket:id for dynamic child and I could generate as many components as I want, right? I will try this anyway;] pozdrawiam Paweł Kamiński [1]kami...@gmail.com [2]pkaminski@gmail.com __ References 1. mailto:kami...@gmail.com 2. mailto:pkaminski@gmail.com
Re: dynamic child in container
thanks, so I understand that it is only possible with AJAX calls. could I make a link callback that will add random number of components on each request? there will be no wicket:id for dynamic child and I could generate as many components as I want, right? I will try this anyway;] pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __
Re: dynamic child in container
This is definitely possible. The easy way is to do ajaxRequestTarget.addComponent(theParentComponent); the drawback being that tho whole parent component will be redrawn, including childs that were already on the page. If that is not acceptable, you could use javascript to first create a child component of your parent with the markupId of your new child (using ajaxRequestTarget.prependJavascript("your javascript code that adds an empty div with correct id to the parent"), and let wicket render the child component by doing ajaxRequestTarget.addComponent(theChildComponent). On Tue, 29 Mar 2011 16:49 +0200, "kamiseq" wrote: > hi, I ve googled a bit but all I ve found are links about panels. > > my problem is that I would like to create components (with corresponding > html markup) and then add those components dynamically on request to > target > container, where child component could be other container that might be > dynamically modified. > what I read about panels is that you need always mark a placeholder for a > child component so there is no way to add more or less child when my > logic > decides to do so. > > is this possible in wicket? could someone point me to some materials > about > it? > > pozdrawiam > Paweł Kamiński > > kami...@gmail.com > pkaminski@gmail.com > __ > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
dynamic child in container
hi, I ve googled a bit but all I ve found are links about panels. my problem is that I would like to create components (with corresponding html markup) and then add those components dynamically on request to target container, where child component could be other container that might be dynamically modified. what I read about panels is that you need always mark a placeholder for a child component so there is no way to add more or less child when my logic decides to do so. is this possible in wicket? could someone point me to some materials about it? pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __