Re: Form clear
I think Form has a clearInputs() method. Or otherwise you'll have to visit() the form's children to call clearInput() on them Martijn On 4/18/08, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote: > > Hi! > > I have an user Form that is posted with AjaxFallbackButton. When the forms > gets submitted without error > I want to clear the form. How can I reset the form? > > -- > View this message in context: > http://www.nabble.com/Form-clear-tp16760778p16760778.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] > > -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form clear
As you should reset the form's model object anyway, you could pass the form to the AjaxRequestTarget e.g. onSubmit(AjaxRequestTarget t) { Object o = getModelObject(); businessLayer.process(o.clone()); o.setFoo(null); o.setBar(null); if (t != null) { t.addComponent(this); } } haven't tested it but should work. maybe you can't set outputmarkupid = true on forms, then you have to put it into a webmarkupcontainer and add the container to the target. regards, Michael Mathias P.W Nilsson wrote: > > Hi! > > I have an user Form that is posted with AjaxFallbackButton. When the forms > gets submitted without error > I want to clear the form. How can I reset the form? > - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Form-clear-tp16760778p16761355.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]
Re: Form clear
you have to clear the model of the form(components). so either set a new (empty) model object for the form (in combination with a compoundpropertymodel) or you have to reset the models of the formcomponents somehow one by one... Gerolf On Fri, Apr 18, 2008 at 8:53 AM, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote: > > Hi! > > I have an user Form that is posted with AjaxFallbackButton. When the forms > gets submitted without error > I want to clear the form. How can I reset the form? > -- > View this message in context: > http://www.nabble.com/Form-clear-tp16760778p16760778.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] > >