PDA

View Full Version : Error Object Confusion


bobandted
Jun 1st, 2006, 10:50 AM
Hi,

I'm confused a bit about the error handling.

Say In the onSubmit method of a SimpleFormController I do this:

errors.rejectValue("mycode", "my default value");


Then in my jsp page I want to get the error value, so when I do the following:

${errorsItem.code} --> give me result "my default value"

The default message is printed! er?? Why not the code? If I do this:

${errorsItem.defaultMessage}

nothing happens. ER? Anyone know what is going on?


thx,
bob.