You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by stanlick <st...@gmail.com> on 2008/12/17 17:49:23 UTC

Using OGNL to set validator parameters

Is there a way to avoid hard coding limits into a validator?  Take for
instance the IntRangeFieldValidator.  It has a min and max property that are
populated from the XML as per:

	<field name="ageLimit">
		<field-validator type="int">
			0
			140
			<message>Age must be between ${min} and ${max}</message>
		</field-validator>
	</field>

I would like to have these values pulled from OGNL to allow for varying
locale limits.  I have experimented with %{minLimit} and added a
getMinLimit() to my action, but have had no luck.

Scott

-- 
View this message in context: http://www.nabble.com/Using-OGNL-to-set-validator-parameters-tp21056761p21056761.html
Sent from the Struts - User mailing list archive at Nabble.com.


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