2013/9/25 JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>:
> Well, I have found a workaround that is not much of a hacking. The
> annotations has a messageParameters that is evaluated against the
> valuestack. Since the action is in the valuestack, and it implements
> ActionSupport,I can pass a parameter that is a call to getText.
>
>         requiredStrings =
>             {@RequiredStringValidator(type = ValidatorType.SIMPLE,
>                     messageParams={"getText('email')"},
>                     fieldName = "event.email", key =
> "validation-error.mandatory")},
>
> and by defining the message as:
>
> validation-error.mandatory        = The field {0} is mandatory
> email = E-mail

I'm not sure if I get you right - does it meet your requirements or do
you expect something different?


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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

Reply via email to