Just wondering if this is the proper way to set error arguments.
Validator code snipperCode:int minAge=18; errors.rejectValue("age", "feedback.error.age.invalidFormat", new String[] { String.valueOf(minAge) }, "Invalid age format");
message.properties
form.jspCode:feedback.error.age.value=Age cannot be less than {0}
Expected ResultCode:<spring:bind path="feedBackForm.age"> <fmt:message key="feedback.age.label"/>: <input type="text" name="age"/> <font color="red">${status.errorMessage}</font> </spring:bind>
Actual ResultCode:Age: 15 Age cannot be less than 12
Looks like the error parameter is not pass into {0}Code:Age: 15 Age cannot be less than {0}
Please help.
Coffeejoy


Reply With Quote