struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Kurjanowicz" <matt.kurjanow...@gmail.com>
Subject Re: Validator not getting called and I can't see why
Date Thu, 03 Aug 2006 22:43:39 GMT
Do you have the property "page" being submitted with your form:
<html:hidden property="page" value="1"/>

Also, are you sure that the validation isn't working and the error
messages aren't getting displayed?  Can you send the jsp source?
-Matt

On 8/3/06, Bart Busschots <bart-lists@so-4pt.net> wrote:
> I'm either missing something stupid (which is always possible) or I've
> managed to break the validator. I have an app that uses validator all
> over the place and it's working fine in all my other actions but for
> this one action it is simply not getting called.
>
> I can't see any difference between this action/form/validation and all
> the other ones that are working.
>
> This is the form:
>
>   <form-bean name="createStudentGroupForm"
> type="org.apache.struts.validator.DynaValidatorForm">
>    <form-property name="groupName" type="java.lang.String" />
>    <form-property name="noStudents" type="java.lang.String" />
>    <form-property name="groupType" type="java.lang.String" />
>    <form-property name="wikiText" type="java.lang.String" />
>    <form-property name="studentNames" type="java.lang.String[]" />
>   </form-bean>
>
> This is the action:
>
>   <action path="/mentor/createStudentGroupStep1"
> type="vtie.portal.mentor.CreateStudentGroupPrepareAction"
> name="createStudentGroupForm" scope="session" validate="true"
> input="/home/mentor/addStudentGroupForm.jsp">
>    <forward name="createAnonymous"
> path="/do/mentor/createAnonymousStudentGroup" />
>    <forward name="getStudentNames"
> path="/home/mentor/getStudentNamesForm.jsp" />
>    <forward name="fail" path="/home/mentor/addStudentGroupForm.jsp" />
>   </action>
>
> And this is the validation:
>
>   <form name="createStudentGroupForm">
>    <field property="groupName" page="1" depends="required, mask">
>     <var><var-name>mask</var-name><var-value>^[a-zA-Z]+[\w\
> ]*$</var-value></var>
>     <arg0 key="mentor.createStudentGroup.groupName.label"/>
>    </field>
>    <field property="noStudents" page="1" depends="required, integer">
>     <arg0 key="mentor.createStudentGroup.noStudents.label"/>
>    </field>
>    <field property="studentNames" page="2" depends="required">
>     <arg0 key="mentor.createStudentGroup.studentNames.label"/>
>    </field>
>   </form>
>
> Can anyone see something obviously wrong there?
>
> Cheers,
>
> Bart.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Matthew Kurjanowicz
matt.kurjanowicz@gmail.com
College of Computing
GEORGIA Institute
of TECHnology

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


Mime
View raw message