Re: Resetting a form after ajax submit

2010-01-26 Thread Flavius
For anybody who's interested, I got this to work by just calling form.textField.setModelValue(new String[]{}); I had to make the fields member vars of the form, though. If there's another cleaner way of doing it, I'd appreciate seeing it. Flavius wrote: I have a panel with a form on it.

Re: Resetting a form after ajax submit

2010-01-26 Thread Andrew Lombardi
You should only need access to the Model on the Form, which you would set to empty, and then you have two options 1. Get access to the TextField so you can repaint it with AjaxRequestTarget 2. Use FormComponent's IVisitor pattern to visit everything in that form to repaint On Jan 26, 2010, at

Re: Resetting a form after ajax submit

2010-01-25 Thread Igor Vaynberg
call form.modelchanged() after setting the new model -igor On Mon, Jan 25, 2010 at 9:23 PM, Flavius flav...@silverlion.com wrote: I have a panel with a form on it.  I've attached an ajaxButton to submit the form.  Afterward, I want the inputs to be reset with the backing model reset.  I've

Re: Resetting a form after ajax submit

2010-01-25 Thread Flavius
I tried that. It didn't work. Actually Component#setDefaultModelObject() already calls modelChanging(); model.setObject(object); modelChanged(); I also looked at the ajax guestbook example. igor.vaynberg wrote: call form.modelchanged() after setting the new model -igor On Mon, Jan