You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Thill <ma...@yahoo.com> on 2004/03/24 00:34:32 UTC
Map-backed ActionForms, validating using validWhen
I have a form that I'm using map-backed properties
with. There is nothing all that unusual about it, but
I'm trying to do validation using the validWhen
built-in validation. I can't seem to figure out if I
can access a map-backed property in the conditional
statement for the validWhen validation. My
validation.xml looks like such:
<form name="circuitBreakerEditForm">
<field property="value(marketCategoryId)"
depends="required">
<arg0 key="label.marketCategoryId"/>
</field>
<field property="value(shortDescription)"
depends="required">
<arg0 key="label.shortDescription"/>
</field>
<field property="value(percentIncrease)"
depends="validwhen">
<arg0 key="label.percentIncrease"/>
<var>
<var-name>test</var-name>
<var-value>((*this* != null) or
(value(percentDecline) != null))</var-value>
</var>
</field>
</form>
The first two for marketCategoryId and
shortDescription work fine, but when I add the 3rd it
gives me an error "unexpected token: value". Does
anyone know how to access a map-backed property in
this conditional part of the validWhen validation?
Thanks for any help
Mark
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org