Search code examples
formswicketsubmission

Wicket - clearInput() after form submission not working


I want to clear form components (textfields etc) and it model. On submit method, after persisting the model correctly, I call clearInput(), but nothing happends to model and fields still filled.

Am I forgetting something about clearInput() method?


Solution

  • In addition to clearInput() you need to set an empty model object and to rerender the form.

    Please show us your code if these suggestions do not help.