You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Musachy Barroso (JIRA)" <ji...@apache.org> on 2009/02/26 22:39:45 UTC

[jira] Resolved: (WW-3014) Message from xml file does not get localise if using Struts 2.1's ajax validation (dojo dependant)

     [ https://issues.apache.org/struts/browse/WW-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso resolved WW-3014.
---------------------------------

    Resolution: Not A Problem

put the i18n interceptor before jsonValidationWorkflowStack. A fix.

> Message from xml file does not get localise if using Struts 2.1's ajax validation (dojo dependant) 
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WW-3014
>                 URL: https://issues.apache.org/struts/browse/WW-3014
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>    Affects Versions: 2.1.6
>         Environment: Found in Tomcat 6.0 on Windows XP
>            Reporter: Qunhuan Mei
>
> Steps to reproduce the bug: 
> 1.	Open project struts2-blank-2.1.6 by importing its war file into eclipse from "...\struts-2.1.6\apps"
> 2.	Copy the form code from Login.jsp into Welcome.jsp, right before </body> tag:
> <s:form action="Login">
>     <s:textfield key="username" />
>     <s:password key="password" />
>     <s:submit/>
> </s:form>
> 	At this point, build and run the project, change locale to Spanish and then click submit without any input, the system will report validation error in Spanish using non-ajax way - correct behaviour!
> 3.	Change submit from non-Ajax validation to Ajax in Welcome.jsp by:
> (1)	Adding dojo taglib to line 3: 
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> (2)	Adding <sx:head /> right before </head> to enable ajax validation on the page
> (3)	Replace <s:submit> with <sx:submit validate="true" ajaxAfterValidation="true" showLoadingText="false"/>
> (4)	Adding do-jo jar file "struts2-dojo-plugin-2.1.6.jar" to the project's lib (from "...\struts-2.1.6\lib") and refresh the project
> (5)	Adding following two lines to example.xml, just below <action name="Login_*" method="{1}" class="example.Login">
>     		<interceptor-ref name="jsonValidationWorkflowStack"/>
> 		<interceptor-ref name="i18n"/>
> At this point, build and run the project, change locale to Spanish and then click submit without any input, the system will report validation error in English, rather than Spanish, while other names on page are in Spanish - A bug.
> Qunhuan Mei
> qm@qm18.wanadoo.co.uk

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