Hi,
You can use a boolean variable in the validate method of your form bean and check whether the mandatory fields were left empty whenever you find an empty mandatory field make the boolean variable true and at the end check the boolean varible, if it is true add an error message which says all mandatory fields need to be filled. You can also use a count variable to count the no.of mandatory fields left empty and check that value if its greated than one then give a common message.
Regards,
Rakesh
|