struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Gin" <Gin.C...@NielsenMedia.com>
Subject RE: validwhen
Date Tue, 01 Jul 2003 14:32:55 GMT
Validwhen is not available yet.
It will be available in 1.2 (see other posts in archives regarding this).
-Tim

-----Original Message-----
From: Eugen Bushuev [mailto:bu@lucky.net]
Sent: Tuesday, July 01, 2003 10:31 AM
To: struts-user@jakarta.apache.org
Subject: validwhen


Hi.
I can't make "validwhen" to work with a DynaForm. My validation.xml 
looks like
<form-validation>
<formset>
<form name="countryForm">
  <field property="name" depends="validwhen">
     <arg0 key="countryForm.name.label"/>
     <var>
       <var-name>test</var-name>
       <var-value>(1==-1)</var-value>
    </var>
  </field>
</form>
</formset>
</form-validation>

But it always validates successfully  (when "depends" is set to 
"required" everything works as it should, but not as i need to).
Other stuff is
in struts-config:
    <form-bean name="countryForm" 
type="org.apache.struts.validator.DynaValidatorForm">
      <form-property name="name"       type="java.lang.String"/>
      <form-property name="regionname" type="java.lang.String"/>
    </form-bean>

    <action   path="/wa/countries"
              type="wire.web.CountryAction"
              name="countryForm"
              scope="request"
              input="/wa/go_countries.do">
    </action>

in jsp:
     <html:form action="/wa/countries" focus="name">

       <tr>
         <td>
           <bean:message key="country.new"/>
         </td>
         <td>
           <html:text property="name" size="16" maxlength="16"/>
         </td>
       </tr>
       <tr>
         <td colspan=2>
           <html:submit property="submit" value="Add"/>
           <html:hidden property="action" value="add"/>
         </td>
       </tr>
     </html:form>

if it matters....
Please, help.

wbr, eugen.

-- 
С уважением, Е.Бушуев.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message