struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Billy Bacon" <billy.ba...@thirty3.net>
Subject Re: Help :: Dyna forms and Validation
Date Fri, 22 Nov 2002 12:18:33 GMT
Do you have an execute() method in your Action? What version of Struts are
you using?

----- Original Message -----
From: "Jordan Thomas" <jot@ipa.fhg.de>
To: <struts-user@jakarta.apache.org>
Sent: Friday, November 22, 2002 5:10 AM
Subject: Help :: Dyna forms and Validation


> Hi,
>
> I have a dynaform that is simply calling inside the action class the
> following.
>
>    public ActionForward performAction( ActionMapping mapping, ActionForm
> form,
>                 HttpServletRequest request, HttpServletResponse response
> )
>                 throws IOException, ServletException {
>
>       return (mapping.findForward("entry"));
>
>    }
>
> When I enter the form, it is doing the error checking as soon as I enter
> the page. How can I stop the application from doing this? I tried using
> "form.validate(mapping, request).clear();" in the above method but that
> didn't work. Is there a way to somehow clear these error values. I am
> using a dynaform specified as:
>
>         <form name="loginForm">
>             <field property="username"
> depends="required,minlength,maxlength">
>                 <arg0 key="label.login.username"/>
>                 <arg1 name="minlength" key="${var:minlength}"
> resource="false"/>
>                 <arg2 name="maxlength" key="${var:maxlength}"
> resource="false"/>
>                 <var>
>                     <var-name>minlength</var-name>
>                     <var-value>2</var-value>
>                 </var>
>                 <var>
>                     <var-name>maxlength</var-name>
>                     <var-value>12</var-value>
>                 </var>
>             </field>
>             <field property="password"
> depends="required,minlength,maxlength">
>                 <arg0 key="label.login.password"/>
>                 <arg1 name="minlength" key="${var:minlength}"
> resource="false"/>
>                 <arg2 name="maxlength" key="${var:maxlength}"
> resource="false"/>
>                 <var>
>                     <var-name>minlength</var-name>
>                     <var-value>6</var-value>
>                 </var>
>                 <var>
>                     <var-name>maxlength</var-name>
>                     <var-value>12</var-value>
>                 </var>
>             </field>
>         </form>
>
> And in my struts-config.xml I have:
>
>     <form-bean name="loginForm" dynamic="true"
>         type="org.apache.struts.validator.DynaValidatorForm">
>         <form-property name="username" type="java.lang.String" />
>         <form-property name="password" type="java.lang.String" />
>     </form-bean>
>
>      ....
>
>     <action path="/login"
>             type="scoop.web.struts.login.LoginEntryAction"
>             name="loginForm"
>             scope="request"
>             input="/tiles/login"
>             validate="true">
>         <forward name="entry" path="/tiles/login"/>
>     </action>
>
> Any help would be great. Thanks in advance
>
> Jordan
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
>
>


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


Mime
View raw message