How to skip required fields validation on CANCEL (button) operation.
843844May 1 2007 — edited Sep 24 2008Hi,
I am having a problem to find a right solution on how to skip required fields validation on CANCEL (button) operation in my JSF program (developed with netbeans with vwp).
Here is the situation:
I had two data input forms, one is for adding new data (entry form), and the other is for updating the existing data (update form). Inside those two forms there are couple of required fields (I have set the required properties of those fields to true). There are two buttons in each form, one for SAVE the data, the other for CANCEL the current process.
When the entry form/update form was open, and I took out (empty) one of the required field's value, then I pressed the CANCEL button to exit from the form. The problem is the program is complaining about the missing value from one of the required field, and it won't let me perform CANCEL operation and close the form without making any changes.
I tried to use "immediate" attribute of the CANCEL button's properties (set to true). It did resolve the 'CANCEL' problem, but it create a new problem in my update form. The new problem is that I cannot see the correct information of my next data in my update form after performing the CANCEL operation in the same form against the previous data.
Is there a 'work-around' to resolve this problem? Please educate me more on this. Thanks!