The application uses JSF 2.0 framework. User inputs values to a form. When user selects save, some fields have validation errors and some don t. User clicks on cancel button. Then user clicks the update button again. Even though the modal values are updated, the fields which had valid values when save was selected display the local values instead of the updated model values.
I solved this issue by adding a resetValues() method in the action method of cancel. The resetValues() loops through the list of children and reset the local values to null.
是否有更好的办法解决这一问题,以改进申请的执行?