Hi,
I am working on a SWT/GUI (non-web based) application and I am looking
into using Validator for validation. In looking into the examples and
source code, I noticed how you reference the actual values in the
validator-multipletest.xml
<formset>
<form name="nameForm">
<field property="firstName" depends="required">
<arg0 key="nameForm.firstname.displayname"/>
</field>
<field property="lastName"
depends="required,int">
<arg0 key="nameForm.lastname.displayname"/>
</field>
</form>
</formset>
</form-validation>
or this example.
<field property="age" depends="isInt, checkRange">
<arg0 key="nameForm.age" />
<var>
<var-name>max</var-name>
<var-value>30</var-value>
</var>
<var>
<var-name>min</var-name>
<var-value>20</var-value>
</var>
One example is from the source found on the jakarta web site for the
commons validator zip file. The bottom one is from a book from Apress
Publishing talking about using the Commons Validator. What I would like
to do instead of hardcoding the value in the xml document, I want to
point to a JavaBean object and call a getMethod like getCurrentMax() and
check to see if it is within an absoluteMin and Max value. I'm
wondering if this can be done. Thanks.
John
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]