Spring - disable bind exceptions (for a particular property)

Posted by Walter White on Stack Overflow See other posts from Stack Overflow or by Walter White
Published on 2010-05-14T14:46:44Z Indexed on 2010/05/28 18:42 UTC
Read the original article Hit count: 321

Filed under:
|
|

Hi all,

In a web application I'm working on using Spring 2.5.6.SEC01, I essentially have an Integer field that takes a number to determine which page to scroll to. The requirements changed, and we no longer want to display an error message, but simply ignore the user's input if they enter an invalid number, say "adfadf".

I was reading that you can do that via:

TypeMismatch.property=Some New Error Message

However, after having tried that, we are still getting the original error message: java.lang.Integer.TypeMismatch=...

I only want to disable this message for that given property. How can I do that? I still want binding to occur automatically, I just don't want to hear about it now.

Walter

© Stack Overflow or respective owner

Related posts about java

Related posts about databinding