You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Joël Royer (JIRA)" <ji...@apache.org> on 2009/03/19 14:30:04 UTC

[jira] Created: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

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.


[jira] Updated: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Joël Royer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joël Royer updated WW-3049:
---------------------------

    Description: 
I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
The validation is done using annotations.

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>


  was:
I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
The validation is done using annotations.

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>



> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
> The validation is done using annotations.
> 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.


[jira] Commented: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Joël Royer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45754#action_45754 ] 

Joël Royer commented on WW-3049:
--------------------------------

Oh sorry, you are right.
the <s:head/> tag was missing in the html header.

Not a bug!

> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
> The validation is done using annotations.
> 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
>         return SUCCESS;
>     }
> }
> 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.


[jira] Commented: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45753#action_45753 ] 

Musachy Barroso commented on WW-3049:
-------------------------------------

You are probably missing the "head" tan in your page, that tag is the one that outputs the link to the js files

> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
> The validation is done using annotations.
> 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
>         return SUCCESS;
>     }
> }
> 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.


[jira] Updated: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Joël Royer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joël Royer updated WW-3049:
---------------------------

    Description: 
I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
The validation is done using annotations.

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
        return SUCCESS;
    }
}

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>


  was:
I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
The validation is done using annotations.

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>



> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
> The validation is done using annotations.
> 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
>         return SUCCESS;
>     }
> }
> 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.


[jira] Resolved: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso resolved WW-3049.
---------------------------------

    Resolution: Not A Problem

> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
> The validation is done using annotations.
> 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
>         return SUCCESS;
>     }
> }
> 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.


[jira] Updated: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Joël Royer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joël Royer updated WW-3049:
---------------------------

    Description: 
I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
The validation is done using annotations.

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>


  was:
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>



> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
> The validation is done using annotations.
> 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.


[jira] Issue Comment Edited: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45753#action_45753 ] 

Musachy Barroso edited comment on WW-3049 at 3/19/09 6:51 AM:
--------------------------------------------------------------

You are probably missing the "head" tag in your page, that tag is the one that outputs the link to the js files

      was (Author: musachy):
    You are probably missing the "head" tan in your page, that tag is the one that outputs the link to the js files
  
> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
> The validation is done using annotations.
> 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
>         return SUCCESS;
>     }
> }
> 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.


[jira] Updated: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Joël Royer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joël Royer updated WW-3049:
---------------------------

    Attachment: ScreenShot_20090319_135236.png

The error under Firefox

> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> 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.


[jira] Issue Comment Edited: (WW-3049) Error "StrutsUtils is not defined" in validation.js, using validation annotation method

Posted by "Joël Royer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45752#action_45752 ] 

Joël Royer edited comment on WW-3049 at 3/19/09 6:33 AM:
---------------------------------------------------------

See the error in the attached screenshot

      was (Author: jroyer):
    The error under Firefox
  
> 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
>         Attachments: ScreenShot_20090319_135236.png
>
>
> I'm getting the error "StrutsUtils is not defined" when my form is displayed (See attached screenshot).
> The validation is done using annotations.
> 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.