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 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:

...
            add(new Button("clear") {
                private static final long serialVersionUID = 1L;

                public void onSubmit() {
                    getForm().clearInput();
                };
            }.setDefaultFormProcessing(false));
...

The first time I use the form, fill some inputs and then hit "Clear", the form is submitted and returns from the server clean (which is what I expected to happen). But after I submit the form with all valid input (that redirects me to another page with a message), then press browser's back button (return to the form) and then hit the Clear button, some of the fields keep they values and some of them cleans. What is happening?


Thanks,
Tom;

---------------------------------------------------------------------
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




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to