Can you show the struts-config.xml for your "SetupForm" - is it using
DynaValidatorForm?

Also have you configured the validator plugin in the struts-config.xml?

Another thing I noticed - the <snip> of your validation.xml shows two
"default" formsets?

Niall

----- Original Message ----- 
From: "fea jabi" <[EMAIL PROTECTED]>
Sent: Monday, November 21, 2005 7:26 PM


> the form is not getting validates I think
> <action
>         path="/PerformDispatchAction"
>         type="com.PerformDispatchAction"
>         name="SetupForm"
>         scope="session"
>         validate="true"
>         input="/pages/Setup.jsp"
>         parameter="method">
>         <forward name="successSave" path="/PrepareAction.do"
> redirect="false"/>
>         <forward name="successNext" path="/PrepareS1Action.do"
> redirect="false"/>
>      </action>
>
>
> I config I did set the validate ="true"
>
> Using dynaforms? Do I have to set anything else?
>
> it simply forwards to the next jsp.
>
> >From: "Niall Pemberton" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
> >To: "Struts Users Mailing List" <user@struts.apache.org>
> >Subject: Re: struts validator
> >Date: Mon, 21 Nov 2005 18:17:47 -0000
> >
> >What you have specified means that the custName field is only valid when
> >the
> >checkbox is set and custName is not null - you also want it to be valid
> >when
> >the checkbox is not set
> >
> >Try the following...
> >
> ><var>
> >     <var-name>test</var-name>
> >     <var-value>((order != 'true') or (*this* != null))</var-value>
> ></var>
> >
> >Niall
> >
> >----- Original Message -----
> >From: "fea jabi" <[EMAIL PROTECTED]>
> >Sent: Monday, November 21, 2005 4:28 PM
> >
> >
> > > Have a jsp with a checkbox.
> > >
> > > If this is checked have to make sure 2 other textfields are not empty.
> > >
> > > i.e if order checkboxs checked  want to make sure that the custName
and
> >the
> > > custNumber are entered.
> > >
> > > Is the below right to do the same?
> > >
> > > <formset>
> > >         <form name="SetupForm">
> > >             <field property="custName" depends="validwhen">
> > >                 <var>
> > >                     <var-name>test</var-name>
> > >                     <var-value>((order == 'true') and (*this* !=
> > > null))</var-value>
> > >                 </var>
> > >             </field>
> > >         </form>
> > >    </formset>
> > >    <formset>
> > >         <form name="SetupForm">
> > >             <field property="custNumber" depends="validwhen,integer">
> > >                 <var>
> > >                     <var-name>test</var-name>
> > >                     <var-value>((order == 'true') and (*this* !=
> > > null))</var-value>
> > >                 </var>
> > >             </field>
> > >         </form>
> > >    </formset>
> > >
> > > In JSp
> > > ................
> > > ..................
> > >
> > > <!-- 12. Customer Name -->
> > >                 <tr>
> > >                     <td>
> > >                         <bean:message key="lbl.custName"/>
<bean:message
> > > key="colon"/>
> > >                     </td>
> > >                     <td>
> > >                         <html:text name="SetupForm"
property="custName"
> > > size="40" />
> > >                     </td>
> > >                      <td align="bottom">
> > >                         <font color=red><html:errors
> > > property="custName"/></font>
> > >                     </td>
> > >                     <td></td>
> > >                 </tr>
> > >                 <tr></tr><tr></tr><tr></tr>
> > >                 <!-- 12.customer Number -->
> > >                 <tr>
> > >                     <td>
> > >                         <bean:message key="lbl.custNumber"/>
> ><bean:message
> > > key="colon"/>
> > >                     </td>
> > >                     <td>
> > >                         <html:text name="SetupForm"
> >property="custNumber"
> > > size="40" />
> > >                     </td>
> > >                      <td align="bottom">
> > >                         <font color=red><html:errors
> > > property="custNumber"/></font>
> > >                     </td>
> > >                     <td></td>
> > >                 </tr>
> > >
> > > .................
> > > ............
> > > <html:javascript formName="SetupForm"/>
> > >         </html:form>
> > >
> > > I tried deploying. But on submit. I don't think the validation is
> >getting
> > > checked. I checked the checkbox but left the the textfields blank. But
> >it
> > > just forwards to the next jsp.
> > >
> > > what am I missing?
> > >
> > > Also, Would like to make sure the number entered inthe custNumber is
> > > positive integer. How can this be done?
> > >
> > > Thanks.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to