Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

[2] Changing xwork.default.invalid.fieldvalue to report type

Matt Raible

2007-08-08

Replies:


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
--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.