I have a gate that contains many TextField input components. Most of these inputs have a validator.
Suppose I entered 50 values ββand one of them did not pass the range validator check. Wicket then generates an error message, but also does not update the models associated with each component. The result is that I lose all 50 values ββthat I just entered and need to be entered again.
My question is: can I tell Wicket about updating models of those components that have valid values, but just report an error for a bad value?
Delving into the framework, I noticed this piece of code in the FormComponent, which seems to indicate that if there is an error, then do not update the model.
public final void processInput() { inputChanged(); validate(); if (hasErrorMessage()) { invalid(); } else { valid(); updateModel(); } }
Is there a way to customize this behavior and achieve my goal of preserving all valid values?
source share