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 2016/02/05 09:37:24 UTC

struts-examples git commit: Adds some more complicated pattern

Repository: struts-examples
Updated Branches:
  refs/heads/master 74c60c11f -> 2697ee741


Adds some more complicated pattern


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

Branch: refs/heads/master
Commit: 2697ee7417c4b87354e287bf50cf8f8364aff479
Parents: 74c60c1
Author: Lukasz Lenart <lu...@gmail.com>
Authored: Fri Feb 5 09:37:07 2016 +0100
Committer: Lukasz Lenart <lu...@gmail.com>
Committed: Fri Feb 5 09:37:07 2016 +0100

----------------------------------------------------------------------
 .../struts/tutorials/wildcardmethod/action/PersonAction.java  | 7 +++++++
 wildcard-method-selection/src/main/resources/struts.xml       | 5 +++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/2697ee74/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java
----------------------------------------------------------------------
diff --git a/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java b/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java
index 4aa0926..4bc65e5 100644
--- a/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java
+++ b/wildcard-method-selection/src/main/java/org/apache/struts/tutorials/wildcardmethod/action/PersonAction.java
@@ -32,6 +32,13 @@ public class PersonAction extends ActionSupport {
         return INPUT;
     }
 
+    public String runCreateThis() {
+        log.debug("In create method");
+        person = new Person();
+
+        return INPUT;
+    }
+
     public String edit() {
         log.debug("In edit method");
         person = personService.getPerson(id);

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/2697ee74/wildcard-method-selection/src/main/resources/struts.xml
----------------------------------------------------------------------
diff --git a/wildcard-method-selection/src/main/resources/struts.xml b/wildcard-method-selection/src/main/resources/struts.xml
index f5e5dba..9aab5c6 100644
--- a/wildcard-method-selection/src/main/resources/struts.xml
+++ b/wildcard-method-selection/src/main/resources/struts.xml
@@ -21,6 +21,11 @@
 			<result name="input">input.jsp</result>
 		</action>
 		
+		<action name="person!*" class="org.apache.struts.tutorials.wildcardmethod.action.PersonAction" method="run{1}This">
+			<result name="success">view.jsp</result>
+			<result name="input">input.jsp</result>
+		</action>
+
    </package>
 
 </struts>