I'm using the DynaForm / Validator stuff for the first time, I've always
written out the Forms and Actions before. Everything seems in place but
the Validator never catches an error and the submit always succeeds.This
is a test where a form submits to "testformSubmit" which should fail if
the age("tage") is not there or is not a integer yet it always goes to
the success page.
from struts-config.xml:
<form-bean
name="testbean"
dynamic="true"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property
name="tname"
type="java.lang.String"/>
<form-property
name="tage"
type="java.lang.String"/>
<form-property
name="tphone"
type="java.lang.String"/>
</form-bean>
and
<action
path="/testformSubmit"
name="testbean"
type="ActionTest"
input="/WEB-INF/jsp/testform.jsp"
scope="request"
parameter="test"
validate="true" >
<forward name="success" path="/pages/Welcome.jsp"/>
</action>
and
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validator.xml" />
</plug-in>
from validation.xml:
<formset>
<form name="testbean">
<field property="tage" depends="required,integer">
</field>
</form>
</formset>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>