struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mraible <m...@raibledesigns.com>
Subject Re: [2] Changing xwork.default.invalid.fieldvalue to report type
Date Thu, 09 Aug 2007 15:48:33 GMT

On a related note, the only way to override
"xwork.default.invalid.fieldvalue" seems to be to specify a global resource
bundle with "struts.custom.i18n.resources" in struts.xml and then put the
value in there. Is this correct?

The following page seems to imply that I should be able to override this
value in package.properties for a particular package.

http://struts.apache.org/2.x/docs/internationalization.html

Thanks,

Matt


Don Brown wrote:
> 
> Hmm...could you use a custom TextProvider impl that recognizes that
> error key, checks the type of the parameter, then looks up a new error
> key, say 'xwork.default.invalid.fieldvalue.number'?
> 
> Don
> 
> On 8/9/07, mraible <matt@raibledesigns.com> wrote:
>>
>> The default value for a type mismatch error (when doing conversion) is:
>>
>> xwork.default.invalid.fieldvalue=Invalid field value for field "{0}".
>>
>> I'd like to change it to render something like "Please enter a valid
>> date."
>> or "Please enter a valid number.". Is it possible to decipher the type of
>> the field and print that out?
>>
>> I realize I can customize the invalid messages on a per-field basis, but
>> I'd
>> like to do it on a per-type basis.
>>
>> Thanks,
>>
>> Matt
>> --
>> View this message in context:
>> http://www.nabble.com/-2--Changing-xwork.default.invalid.fieldvalue-to-report-type-tf4239378.html#a12062895
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-2--Changing-xwork.default.invalid.fieldvalue-to-report-type-tf4239378.html#a12074911
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message