You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eugen Bushuev <bu...@lucky.net> on 2003/07/01 16:31:20 UTC
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