I can also use getText(fieldName) for normal validation messages, for fields I've written validation to. But it doesn't work for overriding the default conversion error. I get the blank screen of doom if write in this and try to submit a field that triggers conversion error: xwork.default.invalid.fieldvalue=Invalid field value for field "${getText(fieldName)}".
With this, I get the message, but the field name is in the standard dot notation and I of course don't get localization: xwork.default.invalid.fieldvalue=Invalid field value for "{0}". On Thu, Jun 26, 2008 at 3:44 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > Hmm, I've used ${getText(fieldName)} in the resources without issues... I > wonder why that worked for me? Are you using the "key" attribute in the form > tag? > > Dave > > > --- On Thu, 6/26/08, Jukka Välimaa <[EMAIL PROTECTED]> wrote: > > > From: Jukka Välimaa <[EMAIL PROTECTED]> > > Subject: Overriding and localizing default conversion error message > > To: "Struts Users Mailing List" <user@struts.apache.org> > > Date: Thursday, June 26, 2008, 8:40 AM > > Hi all, > > > > Does anybody know of a way to override the default type > > conversion error of > > Struts 2 in a way that makes it possible to localize the > > field name? I've > > tried using ${getText(fieldName)} and {0] in the overriding > > message, but > > they don't seem to work. > > > > Jukka > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >