Hi Thorsten,

a Form clears all FormComponents' input automatically on a successful submit.

Why do you think that this is not the case?


On 02.02.2015 17:11, Thorsten Schöning wrote:
Hi all,

I have some very straightforward forms, but am really new to the
whole stateful forms/pages thing in Wicket. My form has some elements
with validators and if things fail the form is rendered again with the
former input values and a feedback message with the error. If no error
occured my form changes some data and provides a simple "success"
feedback message by calling "this.success(...)".

I didn't expect the latter, but instead that the form data is cleared
automatically. Is that something Wicket don't want to do automatically
by purpose because it's only sometimes wanted, not always?

I'm a bit afraid I could forget clearing data on my own in that case
and thought about how to deal with this, especially as forms may grow
in future and fields get added. I'm using CompoundPropertyModel, like
suggested in the tutorials.

Any ideas or suggestions on this? Would be a simple call to
Form.clearInput the best solution?

Thank für your feedback!

Mit freundlichen Grüßen,

Thorsten Schöning

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

Reply via email to