Hi,
Yes it is possible . take a look at this tutorial
http://struts.apache.org/2.x/docs/localizing-output.html
Thansks,
Nuwan.
----- Original Message -----
From: "Ruimo Uno" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Wednesday, January 03, 2007 11:57 AM
Subject: Struts2 conversion error message.
Hi,
I'm evaluating Struts-2.0.1.
The default error message for conversion error is
'xwork.default.invalid.fieldvalue' and it shows something like the
following message:
Invalid field value for field "user.age".
But the 'user.age' is confusing for end users. Moreover, it is
difficult to undestand for non-native people. Of course, you can
override the message by preparing error message for each field:
invalid.fieldvalue.user.age = Age is invalid.
But in this manner, the message explodes because it requires message by
field.
invalid.fieldvalue.user.name = User name is invalid.
invalid.fieldvalue.user.age = Age is invalid.
...
So, my question is "Is it possible to access the field name from
message file?" I want to construct the message something like this:
xwork.default.invalid.fieldvalue = Invalid field value for field
"${getText(fieldName)}".
user.age = Age
user.name = User name
Thanks,
--
Ruimo Uno
(Shisei Hanai)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]