Merge branch 'master' of https://github.com/apache/struts into WW-4638

# Conflicts:
#	core/src/main/resources/template/xhtml/controlheader.ftl
#	core/src/main/resources/template/xhtml/styles.css
This commit is contained in:
victorsosa
2016-06-24 09:46:37 -04:00
224 changed files with 486 additions and 390 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-apps</artifactId>
<packaging>pom</packaging>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-portlet</artifactId>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="edit" extends="struts-portlet-default"
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="eventing" extends="struts-portlet-default" namespace="/eventing">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="help" extends="struts-portlet-default"
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="tiles" extends="struts-portlet-tiles-default" namespace="/tiles">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="view" extends="struts-portlet-default"
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<include file="struts-view.xml"/>
+2 -2
View File
@@ -26,12 +26,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
<name>Struts 2 Rest Showcase Webapp</name>
<description>Struts 2 Rest Showcase Example</description>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-showcase</artifactId>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="actionchaining" extends="struts-default" namespace="/actionchaining">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="conversion" namespace="/conversion" extends="struts-default">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="filedownload" extends="struts-default" namespace="/filedownload">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="fileupload" extends="struts-default" namespace="/fileupload">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="freemarker" namespace="/freemarker" extends="struts-default">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="hangman" extends="struts-default" namespace="/hangman">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="interactive" namespace="/interactive" extends="struts-default">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="modelDriven" extends="struts-default" namespace="/modelDriven">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<!-- START SNIPPET: xworkSample -->
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="ui-tags" extends="struts-default" namespace="/tags/ui">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<include file="struts-tags-ui.xml"/>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="tiles" extends="tiles-default" namespace="/tiles">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="token" extends="struts-default" namespace="/token">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="wait" extends="struts-default" namespace="/wait">
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="xslt" extends="struts-default" namespace="/xslt">
+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<!-- START SNIPPET: xworkSample -->
<struts>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-archetypes</artifactId>
@@ -2,7 +2,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<!--
- This file is included by the struts.xml file as an example
- of how to break up the configuration file into multiple files.
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.devMode" value="true"/>
@@ -2,7 +2,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
@@ -2,7 +2,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<constant name="struts.convention.default.parent.package" value="struts-portlet-default" />
+1 -1
View File
@@ -2,7 +2,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
+1 -1
View File
@@ -2,7 +2,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<package name="default" extends="struts-portlet-default" namespace="/view">
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-assembly</artifactId>
+2 -7
View File
@@ -10,7 +10,7 @@
</parent>
<artifactId>struts2-bom</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Struts 2 Bill of Materials</name>
@@ -25,7 +25,7 @@
</licenses>
<properties>
<struts-version.version>2.5.1-SNAPSHOT</struts-version.version>
<struts-version.version>2.5.2-SNAPSHOT</struts-version.version>
</properties>
<build>
@@ -43,11 +43,6 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>${struts-version.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-osgi-admin-bundle</artifactId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-osgi-demo-bundle</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-osgi-bundles</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.2-SNAPSHOT</version>
</parent>
<artifactId>struts2-core</artifactId>
<packaging>jar</packaging>
@@ -156,10 +156,6 @@ public class ActionSupport implements Action, Validateable, ValidationAware, Tex
return INPUT;
}
public String doDefault() throws Exception {
return SUCCESS;
}
/**
* A default implementation that does nothing an returns "success".
*
@@ -419,7 +419,7 @@ public class DefaultActionInvocation implements ActionInvocation {
Object methodResult;
try {
methodResult = ognlUtil.getValue(methodName + "()", getStack().getContext(), action);
methodResult = ognlUtil.callMethod(methodName + "()", getStack().getContext(), action);
} catch (MethodFailedException e) {
// if reason is missing method, try checking UnknownHandlers
if (e.getReason() instanceof NoSuchMethodException) {
@@ -197,22 +197,30 @@ public class DefaultActionProxy implements ActionProxy, Serializable {
if (config.isAllowedMethod(method)) {
invocation.init(this);
} else {
throw new ConfigurationException("This method: " + method + " for action " + actionName + " is not allowed!");
throw new ConfigurationException(prepareNotAllowedErrorMessage());
}
} finally {
UtilTimerStack.pop(profileKey);
}
}
protected String prepareNotAllowedErrorMessage() {
return LocalizedTextUtil.findDefaultText(
"struts.exception.method-not-allowed",
Locale.getDefault(),
new String[]{method, actionName}
);
}
protected String getErrorMessage() {
if ((namespace != null) && (namespace.trim().length() > 0)) {
return LocalizedTextUtil.findDefaultText(
XWorkMessages.MISSING_PACKAGE_ACTION_EXCEPTION,
"xwork.exception.missing-package-action",
Locale.getDefault(),
new String[]{namespace, actionName});
} else {
return LocalizedTextUtil.findDefaultText(
XWorkMessages.MISSING_ACTION_EXCEPTION,
"xwork.exception.missing-action",
Locale.getDefault(),
new String[]{actionName});
}
@@ -1,31 +0,0 @@
/*
* Copyright 2002-2006,2009 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.opensymphony.xwork2;
/**
* Contains constants for some default XWork messages.
*
* @author Jason Carreira
*/
public interface XWorkMessages {
public static final String ACTION_EXECUTION_ERROR = "xwork.error.action.execution";
public static final String MISSING_ACTION_EXCEPTION = "xwork.exception.missing-action";
public static final String MISSING_PACKAGE_ACTION_EXCEPTION = "xwork.exception.missing-package-action";
public static final String DEFAULT_INVALID_FIELDVALUE = "xwork.default.invalid.fieldvalue";
}
@@ -346,6 +346,13 @@ public class PackageConfig extends Located implements Comparable, Serializable,
return globalExceptionMappingConfigs;
}
/**
* gets the GlobalAllowedMethods local to this package
*
* @return a Set of method names allowed to be executed if strict method invocation is enabled
*/
public Set<String> getGlobalAllowedMethods() { return Collections.unmodifiableSet(globalAllowedMethods); }
public boolean isStrictMethodInvocation() {
return strictMethodInvocation;
}
@@ -194,7 +194,7 @@ public class XWorkConverter extends DefaultTypeConverter {
}
public static String getConversionErrorMessage(String propertyName, ValueStack stack) {
String defaultMessage = LocalizedTextUtil.findDefaultText(XWorkMessages.DEFAULT_INVALID_FIELDVALUE,
String defaultMessage = LocalizedTextUtil.findDefaultText("xwork.default.invalid.fieldvalue",
ActionContext.getContext().getLocale(),
new Object[]{
propertyName
@@ -205,7 +205,7 @@ public class StaticParametersInterceptor extends AbstractInterceptor {
/**
* Adds the parameters into context's ParameterMap.
* As default, static parameters will not overwrite existing paramaters from other sources.
* As default, static parameters will not overwrite existing parameters from other sources.
* If you want the static parameters as successor over already existing parameters, set overwrite to <tt>true</tt>.
*
* @param ac The action context
@@ -289,6 +289,9 @@ public class OgnlUtil {
if (isEvalExpression(tree, context)) {
throw new OgnlException("Eval expression/chained expressions cannot be used as parameter name");
}
if (isArithmeticExpression(tree, context)) {
throw new OgnlException("Arithmetic expressions cannot be used as parameter name");
}
Ognl.setValue(tree, context, root, value);
return null;
}
@@ -308,6 +311,32 @@ public class OgnlUtil {
return false;
}
private boolean isArithmeticExpression(Object tree, Map<String, Object> context) throws OgnlException {
if (tree instanceof SimpleNode) {
SimpleNode node = (SimpleNode) tree;
OgnlContext ognlContext = null;
if (context!=null && context instanceof OgnlContext) {
ognlContext = (OgnlContext) context;
}
return node.isOperation(ognlContext);
}
return false;
}
private boolean isSimpleMethod(Object tree, Map<String, Object> context) throws OgnlException {
if (tree instanceof SimpleNode) {
SimpleNode node = (SimpleNode) tree;
OgnlContext ognlContext = null;
if (context!=null && context instanceof OgnlContext) {
ognlContext = (OgnlContext) context;
}
return node.isSimpleMethod(ognlContext) && !node.isChain(ognlContext);
}
return false;
}
public Object getValue(final String name, final Map<String, Object> context, final Object root) throws OgnlException {
return compileAndExecute(name, context, new OgnlTask<Object>() {
public Object execute(Object tree) throws OgnlException {
@@ -316,6 +345,14 @@ public class OgnlUtil {
});
}
public Object callMethod(final String name, final Map<String, Object> context, final Object root) throws OgnlException {
return compileAndExecuteMethod(name, context, new OgnlTask<Object>() {
public Object execute(Object tree) throws OgnlException {
return Ognl.getValue(tree, context, root);
}
});
}
public Object getValue(final String name, final Map<String, Object> context, final Object root, final Class resultType) throws OgnlException {
return compileAndExecute(name, context, new OgnlTask<Object>() {
public Object execute(Object tree) throws OgnlException {
@@ -350,6 +387,27 @@ public class OgnlUtil {
return exec;
}
private <T> Object compileAndExecuteMethod(String expression, Map<String, Object> context, OgnlTask<T> task) throws OgnlException {
Object tree;
if (enableExpressionCache) {
tree = expressions.get(expression);
if (tree == null) {
tree = Ognl.parseExpression(expression);
checkSimpleMethod(tree, context);
}
} else {
tree = Ognl.parseExpression(expression);
checkSimpleMethod(tree, context);
}
final T exec = task.execute(tree);
// if cache is enabled and it's a valid expression, puts it in
if(enableExpressionCache) {
expressions.putIfAbsent(expression, tree);
}
return exec;
}
public Object compile(String expression, Map<String, Object> context) throws OgnlException {
return compileAndExecute(expression,context,new OgnlTask<Object>() {
public Object execute(Object tree) throws OgnlException {
@@ -364,6 +422,12 @@ public class OgnlUtil {
}
}
private void checkSimpleMethod(Object tree, Map<String, Object> context) throws OgnlException {
if (!isSimpleMethod(tree, context)) {
throw new OgnlException("It isn't a simple method which can be called!");
}
}
/**
* Copies the properties in the object "from" and sets them in the object "to"
* using specified type converter, or {@link com.opensymphony.xwork2.conversion.impl.XWorkConverter} if none
@@ -184,7 +184,7 @@ public class DelegatingValidatorContext implements ValidatorContext {
}
public static TextProvider makeTextProvider(Object object, LocaleProvider localeProvider) {
// the object argument passed through here will most probably be an ActionSupport decendant which does
// the object argument passed through here will most probably be an ActionSupport descendant which does
// implements TextProvider.
if (object != null && object instanceof DelegatingValidatorContext) {
return ((DelegatingValidatorContext) object).getTextProvider();
@@ -81,7 +81,7 @@ public class URLValidator extends FieldValidatorSupport {
"|((\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])\\.){3}" +
"(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])" +
")(:\\d+)?" +
")(((\\/+([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*" +
")(((\\/{0,1}([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*" +
"(\\?([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)" +
"?)?)?" +
"(#([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)?" +
@@ -36,7 +36,7 @@ import java.util.Map;
* <!-- START SNIPPET: javadoc -->
* <p>
* Note that the doublelistkey and doublelistvalue attribute will default to "key" and "value"
* respectively only when the doublelist attribute is evaluated to a Map or its decendant.
* respectively only when the doublelist attribute is evaluated to a Map or its descendant.
* Other thing else, will result in doublelistkey and doublelistvalue to be null and not used.
* </p>
*
@@ -21,7 +21,13 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.ActionContext;
import java.io.Writer;
import java.util.ResourceBundle;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.StrutsException;
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.TextProvider;
import com.opensymphony.xwork2.TextProviderFactory;
@@ -31,13 +37,6 @@ import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.StrutsException;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import java.io.Writer;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* <!-- START SNIPPET: javadoc -->
@@ -92,6 +91,8 @@ public class I18n extends Component {
protected String name;
protected Container container;
private TextProvider textProvider;
private TextProvider defaultTextProvider;
private LocaleProvider localeProvider;
public I18n(ValueStack stack) {
super(stack);
@@ -102,26 +103,31 @@ public class I18n extends Component {
this.container = container;
}
@Inject
public void setTextProvider(TextProvider textProvider) {
this.defaultTextProvider = textProvider;
}
@Inject
public void setLocaleProvider(LocaleProvider localeProvider) {
this.localeProvider = localeProvider;
}
public boolean start(Writer writer) {
boolean result = super.start(writer);
try {
String name = this.findString(this.name, "name", "Resource bundle name is required. Example: foo or foo_en");
ResourceBundle bundle = (ResourceBundle) findValue("getTexts('" + name + "')");
ResourceBundle bundle = defaultTextProvider.getTexts(name);
if (bundle == null) {
bundle = LocalizedTextUtil.findResourceBundle(name, (Locale) getStack().getContext().get(ActionContext.LOCALE));
bundle = LocalizedTextUtil.findResourceBundle(name, localeProvider.getLocale());
}
if (bundle != null) {
final Locale locale = (Locale) getStack().getContext().get(ActionContext.LOCALE);
TextProviderFactory tpf = new TextProviderFactory();
container.inject(tpf);
textProvider = tpf.createInstance(bundle, new LocaleProvider() {
public Locale getLocale() {
return locale;
}
});
textProvider = tpf.createInstance(bundle, localeProvider);
getStack().push(textProvider);
pushed = true;
}
@@ -42,7 +42,7 @@ import java.util.Map;
* <!-- START SNIPPET: javadoc -->
* <p>
* Note that the listkey and listvalue attribute will default to "key" and "value"
* respectively only when the list attribute is evaluated to a Map or its decendant.
* respectively only when the list attribute is evaluated to a Map or its descendant.
* Everything else will result in listkey and listvalue to be null and not used.
* </p>
* <!-- END SNIPPET: javadoc -->
@@ -42,7 +42,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* <li>application - the value will be set in application scope according to servlet spec. using the name as its key</li>
* <li>session - the value will be set in session scope according to servlet spec. using the name as key </li>
* <li>request - the value will be set in request scope according to servlet spec. using the name as key </li>
* <li>page - the value will be set in page scope according to servlet sepc. using the name as key</li>
* <li>page - the value will be set in page scope according to servlet spec. using the name as key</li>
* <li>action - the value will be set in the request scope and Struts' action context using the name as key</li>
* </ul>
*
@@ -120,7 +120,7 @@ public class DefaultActionMapper implements ActionMapper {
protected boolean allowSlashesInActionNames = false;
protected boolean alwaysSelectFullNamespace = false;
protected PrefixTrie prefixTrie = null;
protected Pattern allowedActionNames = Pattern.compile("[a-zA-Z0-9._!/\\-]*");
protected Pattern allowedActionNames = Pattern.compile("^[a-zA-Z0-9_!/\\-]*((.htm[l]?)|(.action))?$");
private boolean allowActionPrefix = false;
private boolean allowActionCrossNamespaceAccess = false;
@@ -13,7 +13,7 @@ import com.opensymphony.xwork2.result.ParamNameAwareResult;
import java.util.Map;
/**
* Default implementation which uses {@link com.opensymphony.xwork2.result.ParamNameAwareResult} to accept or throwaway parameters
* Default implementation which uses {@link com.opensymphony.xwork2.result.ParamNameAwareResult} to accept or throw away parameters
*/
public class StrutsResultFactory implements ResultFactory {
@@ -78,7 +78,7 @@ public abstract class TagModel implements TemplateTransformModel {
Object value = entry.getValue();
if (value != null) {
// the value should ALWAYS be a decendant of TemplateModel
// the value should ALWAYS be a descendant of TemplateModel
if (value instanceof TemplateModel) {
try {
map.put(entry.getKey(), objectWrapper.unwrap((TemplateModel) value));
@@ -7,4 +7,4 @@ xwork.error.action.execution=Error during Action invocation
xwork.exception.missing-action=There is no Action mapped for action name {0}.
xwork.exception.missing-package-action=There is no Action mapped for namespace {0} and action name {1}.
xwork.default.invalid.fieldvalue=Invalid field value for field "{0}".
struts.exception.method-not-allowed=Method {0} for action {1} is not allowed!
@@ -21,5 +21,10 @@
*/
-->
<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl" />
<td
<td
<#if parameters.align?? >
class="align-${parameters.align?html}"
<#else >
class="tdInput"
</#if>
><#t/>
@@ -35,3 +35,4 @@
.tdCheckboxErrorMessage {text-align:left; vertical-align:top;}
.tdErrorMessage {text-align:center; vertical-align:top;}
.formButton {text-align:right;}
.tdInput {text-align:left;}
@@ -64,7 +64,6 @@ public class ActionSupportTest extends XWorkTestCase {
}
assertEquals(Action.INPUT, as.input());
assertEquals(Action.SUCCESS, as.doDefault());
assertEquals(Action.SUCCESS, as.execute());
try {
as.clone();
@@ -157,7 +156,7 @@ public class ActionSupportTest extends XWorkTestCase {
ActionContext.getContext().setLocale(new Locale("da"));
MyActionSupport mas = new MyActionSupport();
assertEquals("santa", mas.doDefault());
assertEquals("santa", mas.execute());
assertNotNull(mas.getTexts());
assertEquals(false, mas.hasActionMessages());
@@ -331,7 +330,7 @@ public class ActionSupportTest extends XWorkTestCase {
private Double val;
@Override
public String doDefault() throws Exception {
public String execute() throws Exception {
return "santa";
}
@@ -0,0 +1,24 @@
package com.opensymphony.xwork2;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
import com.opensymphony.xwork2.mock.MockActionInvocation;
import org.apache.struts2.StrutsInternalTestCase;
import org.junit.Test;
public class DefaultActionProxyTest extends StrutsInternalTestCase {
@Test
public void testThorwExceptionOnNotAllowedMethod() throws Exception {
final String filename = "com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml";
loadConfigurationProviders(new XmlConfigurationProvider(filename));
DefaultActionProxy dap = new DefaultActionProxy(new MockActionInvocation(), "strict", "Default", "notAllowed", true, true);
container.inject(dap);
try {
dap.prepare();
fail("Must throw exception!");
} catch (Exception e) {
assertEquals(e.getMessage(), "Method notAllowed for action Default is not allowed!");
}
}
}
@@ -759,6 +759,21 @@ public class OgnlUtilTest extends XWorkTestCase {
assertEquals(expected.getMessage(), "Eval expressions/chained expressions have been disabled!");
}
public void testCallMethod() throws Exception {
Foo foo = new Foo();
Exception expected = null;
try {
ognlUtil.callMethod("#booScope=@myclass@DEFAULT_SCOPE,#bootScope.init()", ognlUtil.createDefaultContext(foo), foo);
fail();
} catch (OgnlException e) {
expected = e;
}
assertNotNull(expected);
assertSame(OgnlException.class, expected.getClass());
assertEquals(expected.getMessage(), "It isn't a simple method which can be called!");
}
public static class Email {
String address;
@@ -20,10 +20,7 @@ import com.opensymphony.xwork2.*;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
import com.opensymphony.xwork2.test.ModelDrivenAction2;
import com.opensymphony.xwork2.test.TestBean2;
import org.apache.struts2.util.DateFormatter;
import org.springframework.format.annotation.DateTimeFormat;
import javax.swing.text.Style;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
@@ -134,17 +131,17 @@ public class LocalizedTextUtilTest extends XWorkTestCase {
}
public void testDefaultMessage() throws Exception {
String message = LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, Locale.getDefault());
String message = LocalizedTextUtil.findDefaultText("xwork.error.action.execution", Locale.getDefault());
assertEquals("Error during Action invocation", message);
}
public void testDefaultMessageOverride() throws Exception {
String message = LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, Locale.getDefault());
String message = LocalizedTextUtil.findDefaultText("xwork.error.action.execution", Locale.getDefault());
assertEquals("Error during Action invocation", message);
LocalizedTextUtil.addDefaultResourceBundle("com/opensymphony/xwork2/test");
message = LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, Locale.getDefault());
message = LocalizedTextUtil.findDefaultText("xwork.error.action.execution", Locale.getDefault());
assertEquals("Testing resource bundle override", message);
}
@@ -187,12 +184,12 @@ public class LocalizedTextUtilTest extends XWorkTestCase {
}
public void testParameterizedDefaultMessage() throws Exception {
String message = LocalizedTextUtil.findDefaultText(XWorkMessages.MISSING_ACTION_EXCEPTION, Locale.getDefault(), new String[]{"AddUser"});
String message = LocalizedTextUtil.findDefaultText("xwork.exception.missing-action", Locale.getDefault(), new String[]{"AddUser"});
assertEquals("There is no Action mapped for action name AddUser.", message);
}
public void testParameterizedDefaultMessageWithPackage() throws Exception {
String message = LocalizedTextUtil.findDefaultText(XWorkMessages.MISSING_PACKAGE_ACTION_EXCEPTION, Locale.getDefault(), new String[]{"blah", "AddUser"});
String message = LocalizedTextUtil.findDefaultText("xwork.exception.missing-package-action", Locale.getDefault(), new String[]{"blah", "AddUser"});
assertEquals("There is no Action mapped for namespace blah and action name AddUser.", message);
}
@@ -138,6 +138,7 @@ public class URLValidatorTest extends XWorkTestCase {
assertFalse(pattern.matcher("").matches());
assertFalse(pattern.matcher(" ").matches());
assertFalse(pattern.matcher("no url").matches());
assertFalse(pattern.matcher("http://example.com////////////////////////////////////////////////////////////////////////////////////??").matches());
assertTrue(pattern.matcher("http://www.opensymphony.com").matches());
assertTrue(pattern.matcher("https://www.opensymphony.com").matches());
@@ -164,21 +164,4 @@ public class UIBeanTest extends StrutsInternalTestCase {
assertEquals("12", txtFld.getTheme());
}
// I couldn't figure out how to make this test work. Bailing for now.
// public void testEscapeLabel() throws Exception {
// ValueStack stack = ActionContext.getContext().getValueStack();
// MockHttpServletRequest req = new MockHttpServletRequest();
// MockHttpServletResponse res = new MockHttpServletResponse();
// stack.push(this);
//
// TextField txtFld = new TextField(stack, req, res);
// txtFld.setKey("test['foo']");
// txtFld.evaluateParams();
// assertEquals("test_label", txtFld.getParameters().get("label"));
// }
//
// public String getText(String key) {
// assertEquals("test[\\'foo\\']", key);
// return "test_label";
// }
}
@@ -163,8 +163,8 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase {
public void testGetMappingWithNamespaceSlash() throws Exception {
req.setupGetRequestURI("/my.hh/abc.action");
req.setupGetServletPath("/my.hh/abc.action");
req.setupGetRequestURI("/my-hh/abc.action");
req.setupGetServletPath("/my-hh/abc.action");
req.setupGetAttribute(null);
req.addExpectedGetAttributeName("javax.servlet.include.servlet_path");
@@ -181,7 +181,7 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase {
mapping = mapper.getMapping(req, configManager);
assertEquals("", mapping.getNamespace());
assertEquals("my.hh/abc", mapping.getName());
assertEquals("my-hh/abc", mapping.getName());
}
public void testGetMappingWithUnknownNamespace() throws Exception {
@@ -855,7 +855,7 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase {
expected = t;
}
assertTrue(expected instanceof StrutsException);
assertEquals("Action [${action}] does not match allowed action names pattern [[a-zA-Z0-9._!/\\-]*]!", expected.getMessage());
assertEquals("Action [${action}] does not match allowed action names pattern [" + mapper.allowedActionNames.pattern() + "]!", expected.getMessage());
actionName = "${${%{action}}}";
try {
@@ -865,7 +865,7 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase {
expected = t;
}
assertTrue(expected instanceof StrutsException);
assertEquals("Action [${${%{action}}}] does not match allowed action names pattern [[a-zA-Z0-9._!/\\-]*]!", expected.getMessage());
assertEquals("Action [${${%{action}}}] does not match allowed action names pattern [" + mapper.allowedActionNames.pattern() + "]!", expected.getMessage());
actionName = "${#foo='action',#foo}";
try {
@@ -875,7 +875,7 @@ public class DefaultActionMapperTest extends StrutsInternalTestCase {
expected = t;
}
assertTrue(expected instanceof StrutsException);
assertEquals("Action [${#foo='action',#foo}] does not match allowed action names pattern [[a-zA-Z0-9._!/\\-]*]!", expected.getMessage());
assertEquals("Action [${#foo='action',#foo}] does not match allowed action names pattern [" + mapper.allowedActionNames.pattern() + "]!", expected.getMessage());
actionName = "test-action";
assertEquals("test-action", mapper.cleanupActionName(actionName));
@@ -337,4 +337,20 @@ public class TextfieldTest extends AbstractUITagTest {
verify(TextFieldTag.class.getResource("Textfield-11.txt"));
}
public void testNameEvaluation() throws Exception {
TestAction testAction = (TestAction) action;
testAction.setArray(new String[]{"test", "bar"});
testAction.setFooInt(1);
TextFieldTag tag = new TextFieldTag();
tag.setPageContext(pageContext);
tag.setName("array[%{fooInt}]");
tag.doStartTag();
tag.doEndTag();
verify(TextFieldTag.class.getResource("Textfield-14.txt"));
}
}
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="foo" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<input type="checkbox" name="foo" value="hello" id="foo-1" checked="checked" title="mytitle" onchange="alert('foo');"/>
<label for="foo-1" class="checkboxLabel">world</label>
<input type="checkbox" name="foo" value="foo" id="foo-2" title="mytitle" onchange="alert('foo');"/>
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="collection" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<input type="checkbox" name="collection" value="hello" id="collection-1" checked="checked"/>
<label for="collection-1" class="checkboxLabel">world</label>
<input type="checkbox" name="collection" value="foo" id="collection-2" checked="checked"/>
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="collection" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<input type="checkbox" name="collection" value="hello" id="collection-1" checked="checked" disabled="disabled"/>
<label for="collection-1" class="checkboxLabel">world</label>
<input type="checkbox" name="collection" value="foo" id="collection-2" checked="checked" disabled="disabled"/>
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="foo" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<input type="checkbox" name="foo" value="hello" id="foo-1" checked="checked" disabled="disabled" onchange="alert('foo');"/>
<label for="foo-1" class="checkboxLabel">world</label>
<input type="checkbox" name="foo" value="foo" id="foo-2" disabled="disabled" onchange="alert('foo');"/>
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="cb" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<script type="text/javascript">
function autoPopulate_cb(targetElement) {
targetElement.form.elements['foo'].value=targetElement.options[targetElement.selectedIndex].value;
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="myFavouriteFruit" class="label">My Favourite Fruit:</label></td>
<td>
<td class="tdInput">
<script type="text/javascript">
function autoPopulate_myFavouriteFruit(targetElement) {
if (targetElement.options[targetElement.selectedIndex].value == '-1') {
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="myFavouriteFruit" class="label">My Favourite Fruit:</label></td>
<td>
<td class="tdInput">
<script type="text/javascript">
function autoPopulate_myFavouriteFruit(targetElement) {
if (targetElement.options[targetElement.selectedIndex].value == '-1') {
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="cb.bc" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<script type="text/javascript">
function autoPopulate_cb_bc(targetElement) {
targetElement.form.elements['foo'].value=targetElement.options[targetElement.selectedIndex].value;
@@ -2,7 +2,7 @@
<td class="tdLabel">
<label for="myFooValue" class="label">mylabel:</label>
</td>
<td>
<td class="tdInput">
<input type="text" name="myname" value="foo" id="myFooValue"/>
</td>
</tr>
@@ -2,7 +2,7 @@
<td class="tdLabel">
<label for="foo" class="label">mylabel:</label>
</td>
<td>
<td class="tdInput">
<input type="text" name="myname" value="foo" id="foo"/>
</td>
</tr>
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="foo" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<select name="foo" id="foo" class="c1" style="s1" onmousedown="window.status='onmousedown';" onmouseup="window.status='onmouseup';" onmouseover="window.status='onmouseover';" onmousemove="window.status='onmousemove';" onmouseout="window.status='onmouseout';" onchange="fooRedirect(this.selectedIndex)">
<option value="BE">Belgium</option>
<option value="FR">France</option>
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="foo" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<select name="foo" id="foo" onmousedown="window.status='onmousedown';" onmouseup="window.status='onmouseup';" onmouseover="window.status='onmouseover';" onmousemove="window.status='onmousemove';" onmouseout="window.status='onmouseout';" onchange="fooRedirect(this.selectedIndex)">
<option value="BE">Belgium</option>
<option value="FR" selected="selected">France</option>
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="foo_bar" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<select name="foo.bar" id="foo_bar" onmousedown="window.status='onmousedown';" onmouseup="window.status='onmouseup';" onmouseover="window.status='onmouseover';" onmousemove="window.status='onmousemove';" onmouseout="window.status='onmouseout';" onchange="foo_barRedirect(this.selectedIndex)">
<option value="BE">Belgium</option>
<option value="FR">France</option>
@@ -1,6 +1,6 @@
<tr>
<td class="tdLabel"><label for="foo" class="label">mylabel:</label></td>
<td>
<td class="tdInput">
<select name="foo" id="foo" class="c1" style="s1" onmousedown="window.status='onmousedown';" onmouseup="window.status='onmouseup';" onmouseover="window.status='onmouseover';" onmousemove="window.status='onmousemove';" onmouseout="window.status='onmouseout';" onchange="fooRedirect(this.selectedIndex);window.status='onchange';">
<option value="BE">Belgium</option>
<option value="FR">France</option>
@@ -1,4 +1,4 @@
<tr>
<td class="tdLabel"><label for="myname" class="label">mylabel:</label></td>
<td><input type="file" name="myname" size="10" value="" accept="*.txt" id="myname" title="mytitle"/></td>
<td class="tdInput"><input type="file" name="myname" size="10" value="" accept="*.txt" id="myname" title="mytitle"/></td>
</tr>
@@ -3,7 +3,7 @@
<form id="testAction" name="myForm" onsubmit="submitMe(); return validateForm_testAction();" action="/testAction.action" method="post" enctype="myEncType" title="mytitle" accept-charset="UTF-8" onreset="clearErrorMessages(this);clearErrorLabels(this);">
<table class="wwFormTable"> <tr>
<td class="tdLabel"></td>
<td> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<td class="tdInput"> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="testAction_myUpDownSelectTag" multiple="multiple">
@@ -3,7 +3,7 @@
<form id="doubleValidationAction" name="myForm" onsubmit="submitMe(); return validateForm_doubleValidationAction();" action="/doubleValidationAction.action" method="post" enctype="myEncType" title="mytitle" accept-charset="UTF-8" onreset="clearErrorMessages(this);clearErrorLabels(this);">
<table class="wwFormTable"> <tr>
<td class="tdLabel"></td>
<td> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<td class="tdInput"> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="doubleValidationAction_myUpDownSelectTag" multiple="multiple">
@@ -3,7 +3,7 @@
<form id="doubleValidationAction" name="myForm" onsubmit="submitMe(); return validateForm_doubleValidationAction();" action="/doubleValidationAction.action" method="post" enctype="myEncType" title="mytitle" accept-charset="UTF-8" onreset="clearErrorMessages(this);clearErrorLabels(this);">
<table class="wwFormTable"> <tr>
<td class="tdLabel"></td>
<td> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<td class="tdInput"> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="doubleValidationAction_myUpDownSelectTag" multiple="multiple">
@@ -3,7 +3,7 @@
<form id="doubleValidationAction" name="myForm" onsubmit="submitMe(); return validateForm_doubleValidationAction();" action="/doubleValidationAction.action" method="post" enctype="myEncType" title="mytitle" accept-charset="UTF-8" onreset="clearErrorMessages(this);clearErrorLabels(this);">
<table class="wwFormTable"> <tr>
<td class="tdLabel"></td>
<td> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<td class="tdInput"> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="doubleValidationAction_myUpDownSelectTag" multiple="multiple">
@@ -4,7 +4,7 @@
<td class="tdLabelTop" colspan="2"><label class="label">label:</label></td>
</tr>
<tr>
<td><input type="text" name=""/></td>
<td class="tdInput"><input type="text" name=""/></td>
</tr>
</table>
</form>
@@ -1,7 +1,7 @@
<form id="myAction" name="myForm" onsubmit="submitMe()" action="myAction" method="post" enctype="myEncType" title="mytitle">
<table class="wwFormTable"> <tr>
<td class="tdLabel"></td>
<td> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<td class="tdInput"> <script type="text/javascript" src="/struts/optiontransferselect.js"></script>
<table>
<tr><td>
<select name="myUpDownSelectTag" size="5" id="myAction_myUpDownSelectTag" multiple="multiple">
@@ -1,4 +1,4 @@
<tr>
<td class="tdLabel"><label for="myname" class="label">mylabel:</label></td>
<td><label id="myname" title="mytitle">bar</label></td>
<td class="tdInput"><label id="myname" title="mytitle">bar</label></td>
</tr>

Some files were not shown because too many files have changed in this diff Show More