Néstor Boscán wrote:
message.requiredfield = The field "${getText(fieldName)}" is required
Now I need to do some extra javascript validations where I need to get the
message from the property files but I can’t get:
<s:text name="message.requiredfield"><s:param name="fieldName"
value="projectDocument"/></s:text>
I don't think that's how it would work; if I had to guess I'd say that
only positional message parameters would be possible--could be wrong
about that.
That said, you can still call the getText() variant that takes a list or
an array--this should be doable using OGNL syntax; something like:
<s:property value="getText('message.requiredField',
{ 'projectDocument' })"/>
IIRC you can also construct actual arrays:
<s:property value="getText('message.requiredField',
new String[] { 'projectDocument' })"/>
if the first way doesn't work.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org