Hi,
form.clearInput() only clears the raw input (what is received in the
current request) of the form components. That is, it doesn't modify the
underlying models. With setDefaultFormProcessing(false), this means that
your FormComponent models are not updated at all.
The AjaxFormComponentUpdatingBehavior should only be triggered when
input changes on the text fields. It plays no part otherwise when
clicking a button.
As a sidenote, why do you use a Button? This component causes the form
to be submitted but apparently you don't need the values for this
action. A link would save a bit of processing and transfer.
Bertrand
On 06/08/2012 12:33 PM, heapifyman wrote:
Hello,
I've been struggling for a while now with a problem that a Cancel
AjaxButton (with setDefaultFormProcessing(false)) calling form.clearInput()
would not reset my form to original values.
The problem seems to be that I have AjaxFormComponentUpdatingBehavior
(onchange event) for validation added to a few Textfields of the form.
Am I right, that the behaviour updates the model and thus the Cancel button
cannot restore the original value?
And if that really is the problem, is there a best practice how to combine
the two functionalities?
Thanks in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org