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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to