struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Anderson" <>
Subject Re: javascript validation
Date Fri, 20 Jun 2003 12:27:38 GMT
Can someone expalin the <html:javascript> tag a little bit or point me 
somewhere.  I'm trying to understand what the dynamic and static attributes 
do.  I've read over the html tags page at the struts home page, but it 
doesn't explain much.

I've tried with every combination of static and dynamic = true or false.

There is javascript being generated (like validateInteger), but not a 
validateXXXForm function.

I've noticed in my app's logger that the static is generated, but after the 
page has already decided it can't find it.  Also, is it possible that I'm 
going to run into problems writing the .js and then finding it because our 
actions are mapped /do/xxx/yyy/zzz?  It doesn't seem to be looking in the 
right place.

I've been searching all over the web and through the mail-archive for 
answers, but haven't found anything definitive.

Thanks in advance,
Ben Anderson


I have the following in my struts-config.xml

    <action path="/admin/createContentType"
            name="BillingParametersForm" scope="request"
      <forward name="failure" path="/admin/contentTypes.jsp?action=create"/>
      <forward name="success" path="/admin/updateBillingParameters.jsp"/>

and in my validation.xml

    <form name="BillingParametersForm">
      <field property="contentType" depends="required">
        <arg0 key="admin.prompt.contentType"/>

and my jsp has the following form

<html:form action="/admin/createContentType" focus="contentType"

<html:text property="contentType"/>
<html:submit property="action" value="Create"/>
<html:reset value="Reset"/>


<html:javascript formName="BillingParametersForm"
   dynamicJavascript="true" staticJavascript="false"/>
<script language="Javascript1.1" src="staticJavascript.jsp"></script>

My BillingParametersForm extends org.apache.struts.validator.ValidatorForm
When the field is left blank an alert window does pop up as it should, but
after I dismiss it I get forwarded onto the success page.

Any suggestions on what I might be doing wrong.


I'm using Vodafone Mail - to get your free mobile email account go to
Use of Vodafone Mail is subject to Terms and Conditions

Help STOP SPAM with the new MSN 8 and get 2 months FREE*

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

View raw message