On 9/26/06, Chetan Pandey <[EMAIL PROTECTED]> wrote:

In my form I have
Int [] roleIds = null.
This is used as the Underlying Datatype of a multiple-select Drop-down.
Everything works fine but I am not sure how to validate?
The following that I tried did not work:
<field property="roleIds" depends="validwhen">
             <arg0 key="lms.role"/>
              <var>
      <var-name>test</var-name>
      <var-value> (*this* != 0)</var-value>
    </var>
   </field>

I think validwhen only works with String and Integer.  Here's the
ANTLR grammar file:
http://svn.apache.org/repos/asf/struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.g

What are you trying to validate?  Generally, validwhen is used when
validation for one field depends on the value of some other field.

Also, there may be some problems with validwhen and arrays, Google
turned up a couple of mailing list threads and a JIRA issue
(STR-2802).

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to