Hi,
What contract should be for FormComponent.getConvertedInput() method,
for components like ListMultipleChoice, which operates on Collection
of objects? When there are no selected values this method (exactly:
convertedInput field) should be set on empty Collection (0 sized) or
null object?
For ListMultipleChoice it is set to empty list but such behavior leads
to a problem in FormComponents.validate() method:
if (isRequired() && getConvertedInput() == null && isInputNullable())
{
reportRequiredError();
}
else
{
validateValidators();
}
where there is a condition to check if getConvertedInput() is null. So
for required field when its value is selected but not available in
list anymore, this required check will always be true. So even such
field has no value, required message will not be displayed and form
will be submitted.
--
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]