I have a Checkbox component which has a custom validator. The validator requires the checkbox to be in checked state under certain circumstances.
My problem is the following:
1. the checkbox is checked
2. the user unchecks it and submits the form
3. after the resulting page is rendered, the validation message is rendered as expected BUT the checkbox will be checked!
The cause of the problem is that Checkbox doesn't record the newly submitted value in the validation delegate.
For example TextField does this task indirectly by calling TranslatedFieldSupport.parse(), and the recorded value is read indirectly by TranslatedFieldSupport.format().
Proposed solution: call the delegate's getFieldInputValue() and recordFieldInputValue() methods.