Yes, ok, right, thats a point.
But I still cannot see a clear alternative to handle it at all, not in
the xml way and even less in the annotation way (which would be our
preferred realization approach)
In a model driven action I have to handle in model, or?
Ok I could specify it direct on action
If you're doing validation differently based on the
action then trying to do validation based on the model
doesn't seem like a good idea: you're not trying to
validate the model the same way for every action.
--- lbastil <[EMAIL PROTECTED]> wrote:
>
> Could someone please state whether I have er
Could someone please state whether I have error in reasoning here or not?
... even a "I would think its not possible with build in features yet" would
help me.
Thank you a lot,
Basti
lbastil wrote:
>
> OK, sorry, I may have to describe it a little more in detail or I did not
> understand the
OK, sorry, I may have to describe it a little more in detail or I did not
understand the whole point ...
Yes, lets assume I have:
FooClass-meth1-validation.xml
First set of validations
FooClass-meth2-validation.xml
Second set of validations
Action class FooClass is modeldriven
You said you wanted different validation for different
methods in an action, yes?
FooClass-meth1-validation.xml
First set of validations
FooClass-meth2-validation.xml
Second set of validations
Perhaps I'm misunderstanding what you want to do.
Regarding annotations, AFAIK you ca
Hm, but as I have model driven action,
for both methods (even if I want to validate different attributes later on)
the first I have to use is VisitorFieldValidator with appendPrefix=false for
the model attribute of the action class.
So at this level there is no difference, thats why I cannot see
Create two validation XML files, one for each method.
You can differentiate between them in a couple
different ways, the easiest may be to just create two
action mappings, one for each method.
d.
--- lbastil <[EMAIL PROTECTED]> wrote:
>
> Is there any way with the build in declarative
> validat
;
>
> true
>
>
>
> ...
>
>
>
>
>
> cilquirm <[EMAIL PROTECTED]>
> 17/09/2007 16:50
> Veuillez répondre à
> "Struts Users Mailing List"
>
>
> A
> user@struts.apache.org
> cc
>
> Objet
> Re: [S2] C
17/09/2007 16:50
Veuillez répondre à
"Struts Users Mailing List"
A
user@struts.apache.org
cc
Objet
Re: [S2] Conditional Validation (test if field is present in JSP)
somewhat hackish, but you can accomplish this by using expressions :
#params['attrib'] != null ? att
somewhat hackish, but you can accomplish this by using expressions :
#params['attrib'] != null ? attrib in ('a','list','of','values')
(this is just an example stating that you can check for the existence of the
variable in the parameter and then execute an expression like you normally
would )
10 matches
Mail list logo