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 =
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
2013/9/25 JOSE L MARTINEZ-AVIAL jlm...@gmail.com:
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=jlmagcatgmail.com*'. The bean and the parameter are created
correctly, so this part works
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
-AVIAL jlm...@gmail.com
À : Struts Users Mailing List user@struts.apache.org
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
De : JOSE L MARTINEZ-AVIAL jlm...@gmail.com
À : Struts Users Mailing List user@struts.apache.org
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
...@yahoo.fr
Envoyé le : Mercredi 25 septembre 2013 14h54
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
2013/9/25 JOSE L MARTINEZ-AVIAL jlm...@gmail.com:
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
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}
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 jlm...@gmail.com
I will open a ticket. My idea is to add a parameter to the annotation
called keyArgs, which would be a
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 =
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=jlmagcatgmail.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