« Return to Thread: hasErrors question

Re: hasErrors question

by Peter Ledbrook-2 :: Rate this Message:

Reply to Author | View in Thread

> My question is about hasErrors…  I can see in the generated controller where
> it will call hasErrors() on an object.  How do I set errors like that?  I
> tried obj.hasErrors = true, but that didn't work.  I don't know what to
> search for, so I can't find any documentation besides what the tag hasErrors
> does…

See the "reject()" and "rejectValue()" methods in the Errors interface:

  http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/validation/Errors.html

"rejectValue()" is probably the one you want.

Cheers,

Peter

--
Software Engineer
G2One, Inc.
http://www.g2one.com/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: hasErrors question

LightInTheBox - Buy quality products at wholesale price