You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2017/04/04 07:17:01 UTC

struts git commit: WW-4663 Fallback to old behaviour if there is no action defined

Repository: struts
Updated Branches:
  refs/heads/master c56d95d28 -> 1162ddf82


WW-4663 Fallback to old behaviour if there is no action defined


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/1162ddf8
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/1162ddf8
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/1162ddf8

Branch: refs/heads/master
Commit: 1162ddf823b9d47df080fd273f1da22e088eda72
Parents: c56d95d
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Apr 4 09:16:48 2017 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Tue Apr 4 09:16:48 2017 +0200

----------------------------------------------------------------------
 core/src/main/java/org/apache/struts2/components/Form.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/1162ddf8/core/src/main/java/org/apache/struts2/components/Form.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/components/Form.java b/core/src/main/java/org/apache/struts2/components/Form.java
index 13247a9..f1f779c 100644
--- a/core/src/main/java/org/apache/struts2/components/Form.java
+++ b/core/src/main/java/org/apache/struts2/components/Form.java
@@ -276,6 +276,15 @@ public class Form extends ClosingUIBean {
 
         String formActionValue = findString(action);
         ActionMapping mapping = actionMapper.getMappingFromActionName(formActionValue);
+
+        if (mapping == null) {
+            mapping =  actionMapper.getMappingFromActionName((String) getParameters().get("actionName"));
+        }
+
+        if (mapping == null) {
+            return Collections.EMPTY_LIST;
+        }
+
         String actionName = mapping.getName();
 
         String methodName = null;