target.add(panelFoo) -- Jeremy Thomerson http://www.wickettraining.com
On Wed, Dec 30, 2009 at 12:57 PM, wic...@geofflancaster.com < wic...@geofflancaster.com> wrote: > I'm trying this but the panel isn't being displayed. Should I also see the > contents of the panel displayed in the <ajax-response> tags on the "wicket > ajax debug window"? As of right now, all I see in the tags is the > javascript to add the markup. > > Original Message: > ----------------- > From: Igor Vaynberg igor.vaynb...@gmail.com > Date: Wed, 30 Dec 2009 09:17:53 -0800 > To: users@wicket.apache.org > Subject: Re: creating item after form is submitted via ajax > > > this should help > > > http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-ite > ms-via-ajax/<http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-ite%0Ams-via-ajax/> > > the trick is to add the markup that the component is anchored to using > javascript. > > -igor > > On Wed, Dec 30, 2009 at 9:13 AM, wic...@geofflancaster.com > <wic...@geofflancaster.com> wrote: > > Is there a way to create an item only after a form has been submitted? > > > > For example, how can I do the following: > > > > ---Java Psuedo-Code--- > > Panel panel1 = new RandomPanel("panel1"); > > > > add(panel1); > > > > add(new AjaxButton("button", form){ > > > > onSubmit(AjaxRequestTarget target, Form form){ > > Panel panel2 = new RandomPanel("panel2"); > > } > > }; > > > > ---End java Psuedo-Code--- > > > > ---Psuedo-HTML--- > > ... > > <span wicket:id="panel1"><span wicket:id="panel2"></span></span> > > ... > > ---End Psuedo-HTML--- > > > > When I try it now I get an error saying panel2 is in my markup but not > > added to the page. Any help is greatly appreciated. > > > > Thanks! > > > > > > > > -------------------------------------------------------------------- > > mail2web.com – Enhanced email for the mobile individual based on > Microsoft® > > Exchange - http://link.mail2web.com/Personal/EnhancedEmail > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > > -------------------------------------------------------------------- > mail2web.com – Enhanced email for the mobile individual based on > Microsoft® > Exchange - http://link.mail2web.com/Personal/EnhancedEmail > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >