Browse Source

add getAction() method

fuhai 6 years ago
parent
commit
b4f8f16832
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/main/java/com/jfinal/core/ActionHandler.java

+ 6 - 1
src/main/java/com/jfinal/core/ActionHandler.java

@@ -45,6 +45,11 @@ public class ActionHandler extends Handler {
 		this.injectDependency = constants.getInjectDependency();
 		this.controllerFactory = constants.getControllerFactory();
 	}
+
+	
+	public Action getAction(String target, String[] urlPara) {
+        return actionMapping.getAction(target, urlPara);
+    }
 	
 	/**
 	 * handle
@@ -59,7 +64,7 @@ public class ActionHandler extends Handler {
 		
 		isHandled[0] = true;
 		String[] urlPara = {null};
-		Action action = actionMapping.getAction(target, urlPara);
+		Action action = getAction(target, urlPara);
 		
 		if (action == null) {
 			if (log.isWarnEnabled()) {