Hi,
Just reviewing old things, I discovered I didn't answer you. The think
is that the same effect can be obtained using the already existing
functionality. I can create the following annotation to validate a field:
@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName =
"phoneCountry
2013/9/25 JOSE L MARTINEZ-AVIAL :
> 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
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 =
I just created the issue https://issues.apache.org/jira/browse/WW-4208. I
maybe able to provide a patch for this, if I have time for it.
2013/9/25 JOSE L MARTINEZ-AVIAL
> I will open a ticket. My idea is to add a parameter to the annotation
> called keyArgs, which would be a String array. It w
I will open a ticket. My idea is to add a parameter to the annotation
called keyArgs, which would be a String array. It would be used as follows:
requiredStrings =
{@RequiredStringValidator(type = ValidatorType.SIMPLE,
keyArgs={"email","one","two"}
2013/9/25 JOSE L MARTINEZ-AVIAL :
> I have javascript controls for the client-side validation, but we also want
> to implement server-side validation. I'm not criticizing the framework, I
> really really like it. I'm just wondering if the validations could be a
> little more flexible to allow reusi
Objet : Re: Translation of fieldName in annotated validations
I have javascript controls for the client-side validation, but we also want
to implement server-side validation. I'm not criticizing the framework, I
really really like it. I'm just wondering if the validations could be a
l
gt;
>
>
> De : JOSE L MARTINEZ-AVIAL
> À : Struts Users Mailing List
> Envoyé le : Mercredi 25 septembre 2013 12h51
> Objet : Re: Translation of fieldName in annotated validations
>
>
> Yes, what I would like is to define a message fo
-AVIAL
À : Struts Users Mailing List
Envoyé le : Mercredi 25 septembre 2013 12h51
Objet : Re: Translation of fieldName in annotated validations
Yes, what I would like is to define a message for each validator that could
be reused with any field just by having the fieldname translated. Let's
Yes, what I would like is to define a message for each validator that could
be reused with any field just by having the fieldname translated. Let's say
I have a form to create an user, with fields First name, Last name and
Email, where all the fields are required. I would define the following
prope
2013/9/25 JOSE L MARTINEZ-AVIAL :
> Hello,
>I have an Action that receives a parameter *email *on a bean *event*. So
> basically the parameter is send to the server with name "*
> event.email=jlmagcgmail.com*"'. The bean and the parameter are created
> correctly, so this part works ok. Now I wa
Hello,
I have an Action that receives a parameter *email *on a bean *event*. So
basically the parameter is send to the server with name "*
event.email=jlmagcgmail.com*"'. The bean and the parameter are created
correctly, so this part works ok. Now I want to validate the input using
annotations.
12 matches
Mail list logo