shoa
Jun 3rd, 2006, 08:02 PM
Hello
In my Validator, to catch a error, I can have a function such as:
if (student.getStudentName() ==null ||student.getStudentName().equals(""){
errors.rejectValues("studentName", "error", "Please enter a name");
}
It can be seen that if there is missing of student name, i can show a defined message "Please enter a name"
However, if I have Binding Exception for a field, how i can show a defined message - for example a NumberFormatException for a field ????
Thanks
sho
In my Validator, to catch a error, I can have a function such as:
if (student.getStudentName() ==null ||student.getStudentName().equals(""){
errors.rejectValues("studentName", "error", "Please enter a name");
}
It can be seen that if there is missing of student name, i can show a defined message "Please enter a name"
However, if I have Binding Exception for a field, how i can show a defined message - for example a NumberFormatException for a field ????
Thanks
sho