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();
};
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:
...
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
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
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