[IceFaces] Why are validators of unchanged components called?
- by bitschnau
I have a IceFaces-form and several input fields.
Let's say I have this:
<ice:selectOneMenu id="accountMenu"
value="#{accountController.account.aId}"
validator="#{accountController.validateAccount}">
<f:selectItems id="accountItems"
value="#{accountController.accountItems}" />
</ice:selectOneMenu>
and this:
<ice:selectOneMenu id="costumerMenu"
value="#{customerController.customer.cId}"
validator="#{customerController.validateCustomer">
<f:selectItems id="customerItems"
value="#{customerController.customerItems}" />
</ice:selectOneMenu>
If I change one value, the respective validator is called, what is fine. But also the other validator is called, which is not fine, because the user get's an irritating message to insert a value to a field he maybe was just going to pay attention to. It's like poking the user with a stick to "Hurry up now!". BAD!
I thought the attribute "partialSubmit" is controlling this behaviour, so only the one DOM-part is submitted, which is affected by the user interaction, but if I declare the both components to be partially submitted, nothing changes. Still both validators are called if one component value is changed.
How can I prevent the whole form from being validated until it is submitted completely?