StatelessForm.clearInput()

2009-10-30 Thread Tomás Rossi
Hi. I have a stateless form and a button inside to reset all fields like this: ... add(new Button(clear) { private static final long serialVersionUID = 1L; public void onSubmit() { getForm().clearInput(); };

Re: StatelessForm.clearInput()

2009-10-30 Thread Martin Grigorov
What's the benefit of this approach instead of using input type=reset/ without involving Wicket at all (it is stateless form) ? El vie, 30-10-2009 a las 12:42 -0300, Tomás Rossi escribió: Hi. I have a stateless form and a button inside to reset all fields like this: ...

Re: StatelessForm.clearInput()

2009-10-30 Thread Tomás Rossi
That's a very good question. I'll use that. But then, if it weren't a stateless form, should I involve Wicket and use clearInput()? Why? Tom; Martin Grigorov escribió: What's the benefit of this approach instead of using input type=reset/ without involving Wicket at all (it is stateless

Re: StatelessForm.clearInput()

2009-10-30 Thread Tomás Rossi
Wait a minute... Because I need a reset button which effectively clean all fields and feedback messages. Reset button doesn't do that so it's not what I want. Tomás Rossi escribió: That's a very good question. I'll use that. But then, if it weren't a stateless form, should I involve Wicket

Re: StatelessForm.clearInput()

2009-10-30 Thread Tomás Rossi
Ok, I did it. I needed to clean the model object like this... ... add(new Button(clear) { private static final long serialVersionUID = 1L; public void onSubmit() { getForm().modelChanging(); data.clear(); // data is