struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <>
Subject RE: Validation Javascript
Date Thu, 05 Sep 2002 15:21:54 GMT
> -----Original Message-----
> Sent: Thursday, September 05, 2002 8:05 AM
> To:
> Subject: Validation Javascript
> Could somebody please explain the following. I'm probably 
> missing something
> simple but I just don't understand how the validate code is 
> accessed and
> called from the validation.xml and validation-rules.xml files.
> [deleted]
> I can see how the validateLogonForm is called but not how the 
> other code is
> called.
> How does the validateMaxLength and validateMinLength calls 
> get executed when
> they are not included, as far as I can see in the page source 
> window, in the
> downloaded page?

I don't remember where I saw the basic validator examples, but if you can
find them, you'll see the use of both the "dynamicJavascript" and
"staticJavascript" attributes of the "<html:javascript>" element, but in
different places.

In the example I saw, you have a JSP file (called "staticJavascript.jsp")
that has almost nothing but the following line:

  <html:javascript dynamicJavascript="false" staticJavascript="true"/>

Then, in each of your pages that need validation, you would have something
like this:

  <html:javascript formName="<formname>"
                   dynamicJavascript="true" staticJavascript="false"/>


  <script language="Javascript1.1"

If you use Tiles, the latter line could go in the layout, and the former
would go in your "body page".

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message