Hi,

validation is easy when you know how your field is named:

http://struts.apache.org/2.x/docs/validation.html

But how its done if you don't know it exactly.
E.g. this one:

<s:textfield name="ruleSets[%{#status.index}].rules[%{#rulesStat.index}]" />

You get something like:

ruleSets[0].rules[0].points

I tried 
http://www.opensymphony.com/xwork/wikidocs/Validation Annotation.html

and annotated my Entity Class with @Validation and the setPoints method with a 
IntRangeValidator - but nothing happend.
The xml File needs the fieldName which i don't have. I've got no more ideas (i 
can implement the validate() method and parse all my parameters there, but i 
hope this can be done via framework).
Any help appreciated.

-- 
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html

Really, I'm not out to destroy Microsoft. That will just be a 
completely unintentional side effect."
        -- Linus Torvalds

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to