On Wed, 2004-02-25 at 15:20, [EMAIL PROTECTED] wrote:
> Hi Mike:
> 
> > Thank you. And if I understand correctly, this feature is not available
> > in the latest release build, v1.1. I guess I have to wait until v1.2
> > comes out?
> >
> I'm using stable release of Struts 1.1

I found that you can set this property on v1.1, but it doesn't do
anything. Have you verified that you get both maxlength and required
errors at the same time in one alert box?

> 
> I assume you changed your calls to specific Validator functions to the
> wrapper function built by Validator and named the way I specified?

Yes. In your example below, if you do a view source on index.jsp you
will see javascript function called validateLoginForm. If userid is
required and has a maxlength and passwd is required, the return
statement for validateLoginForm will be: return validateMaxLength(form)
&& validateRequired(form).

So, it will only show the maxlength error or the required errors, but
not both.

> 
> To the best of my limited knowledge you shouldn't be calling the
> individual Validator functions. Unless you're doing something special?
> 
> See my complete index.jsp below sig
> 
> In my app I have:
>  LoginForm.java (extends ValidatorForm)
> 
> If that's not helping give me an idea of where you're still having problems.
> -Ryan
> 
> File = index.jsp:
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> <link href="lib/style.css" rel="stylesheet" type="text/css">
> <title><bean:message key="index.title" /></title>
> 
> <html:javascript formName="loginForm"/>
> 
> </head>
> <body bgcolor="White">
>   <html:form action="console" onsubmit="return validateLoginForm(this)">
>     <table cellspacing="0" cellpadding="3" border="0" width="60%">
>       <tr><td colspan="3"><img src="images/afr.jpg" width="514"
> height="110" alt="<bean:message key="index.title" />"></td></tr>
>       <tr>
>         <td align="right">User Name</td>
>         <td>
>           <html:text property="userid"></html:text>
>         </td>
>         <td rowspan="3"><html:errors /></td>
>       </tr>
>       <tr>
>         <td align="right">Password</td>
>         <td>
>           <html:password property="passwd"></html:password>
>         </td>
>       </tr>
>       <tr>
>         <td>&nbsp;</td>
>         <td>
>           <html:submit></html:submit>
>         </td>
>       </tr>
>     </table>
>   </html:form>
> </body>
> </html>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to