Field values with type conversion errors are put into a map in the ActionContext. This map contains field names mapped to the invalid values. The "conversionError" Interceptor (com.opensymphony.webwork.interceptor.WebWorkConversionErrorInterceptor) is part of the default Interceptor stack, and it's job is to go through this map and add field error messages to the Action by looking up a localized text message for the key "invalid.fieldvalue.fieldName" where fieldName is the name of your field. It uses the text you've seen as the default text. So one way of customizing the messages is to provide text for these keys in your message property files.
You can also choose to not apply the conversionError Interceptor, and use the conversion field validator in the Xwork Validator Framework. This allows you to specify a key and default message to use if it finds the field name in the type conversion error map. Check out this article on the wiki: http://wiki.opensymphony.com/space/Type+Conversion+Error+Handling > -----Original Message----- > From: Samuel Mota [mailto:[EMAIL PROTECTED] > Sent: Monday, January 26, 2004 4:00 PM > To: [EMAIL PROTECTED] > Subject: [OS-webwork] Type conversion error messages > > > Hi, > > How can I disable or change the type conversion error message? > > It's a real error (trying to type alpha on a numeric fields) > but I'd like to handle it by myself (validate method) on some > (just a few:) fields ... or change the default message to "*" > instead "Invalid field value for field xxxxx". > > Anyway to do this? > > thanks > > samuel > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, > CA. http://www.eclipsecon.org/osdn > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork