Error "StrutsUtils is not defined" in validation.js, using validation 
annotation method
---------------------------------------------------------------------------------------

                 Key: WW-3049
                 URL: https://issues.apache.org/struts/browse/WW-3049
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.1.6
         Environment: Windows XP SP2, Eclipse Ganymede SR2, Maven 2.0.10
            Reporter: Joël Royer


I'm getting the error "StrutsUtils is not defined" when my form is displaying. 
The validation is done using annotations.
The form
Here is the action code:
@Validation()
public class ExportAction extends ActionSupport {
        @SkipValidation
        public String prepare() throws Exception {
                // This method is called before the display of the form

                // Forward to the form tiles
                return INPUT;
        }

        @Validations(
                requiredFields =
                        {...@requiredfieldvalidator(type = 
ValidatorType.SIMPLE, fieldName = "email", message = "Vous devez saisir votre 
adresse e-mail.")},
                emails =
                        {...@emailvalidator(type = ValidatorType.SIMPLE, 
fieldName = "email", message = "Vous devez saisir une adresse e-mail valide.")}
        )
        public String launch() throws Exception {
                // This method is called on the submit button activation
        }
}

Here is the JSP code of my form:
<%@ page language="java" contentType="text/html; charset=UTF-8" 
pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="Export_launch" method="get" validate="true">
        <s:hidden name="fullExport"/>
        <s:hidden name="lastExportRunDateISOStr"/>
        <div class="txt_standard">
                <s:textfield label="Votre adresse e-mail" labelSeparator=":" 
name="email" tabindex="0" size="40" labelposition="left" />
                 <h3>Un rapport vous sera transmis en fin de traitement à cette 
adresse.</h3>           
        </div>
        <div class="txt_standard">
                <h2>Export complet des Individus</h2>
                <h3>Traitement long qui exporte la totalité des individus avec 
toutes leurs coordonnées.</h3>
                <s:submit value="Export global" 
onclick="this.form.fullExport.value='true';"/>
        </div>
        <div class="txt_standard">
                <h2>Export partiel des Individus</h2>
                <h3>Traitement court qui exporte uniquement les individus 
modifié depuis le dernier export en date du <s:date name="lastExportRunDate"  
format="dd/MM/yyyy HH:mm"/></h3>
                <s:submit value="Export partiel" 
onclick="this.form.fullExport.value='false';"/>
        </div>
        <div class="txt_standard">
                <h2>Dernier fichier exporté le <s:date name="lastExportRunDate" 
 format="dd/MM/yyyy HH:mm"/></h2>
        </div>
        <div class="txt_standard">
                <img src="images/general/icon_square1.gif" alt="square" 
class="img_square">
                <s:set var="urlExport"><s:property 
value="exportWebPath"/>/<s:property value="lastExportFilename"/></s:set>
                <a href="<s:property value="urlExport" />" 
class="lnk_square"><s:property value="lastExportFilename"/></a>
        </div>
</s:form>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to