I have a customer registration form with two fields, the first field is the CPF with mandatory completion and the second Name with optional fill. When editing a customer with CPF and Name filled in, delete both fields and click Save, JSF returns the message "CPF field is required". However, when displaying the message the CPF field is blank as submitted. The Name field is not empty as it was submitted, but with the previous value.
Would this be the default behavior of JSF 2? Can I base this behavior on the JSF JCP documentation? What arguments do you present to the customer that the CPF field is blank to show the requirement and the Name field is restored because the JSF lifecycle did not complete to accept the new value?