scriptactionfactoryproxy.java
来自「webwork source」· Java 代码 · 共 58 行
JAVA
58 行
/* * WebWork, Web Application Framework * * Distributable under Apache license. * See terms of license at opensource.org */package webwork.action.factory;import webwork.action.Action;import webwork.action.standard.Script;/** * Obtains the Script action if the suffix is a supported scripting suffix. * * @author Rickard 謆erg (rickard@middleware-company.com) * @version $Revision: 1.9 $ */public class ScriptActionFactoryProxy extends ActionFactoryProxy{ // Attributes ---------------------------------------------------- // Constructors -------------------------------------------------- public ScriptActionFactoryProxy(ActionFactory aFactory) { super(aFactory); } // ActionFactory overrides --------------------------------------- /** * If the suffix of the action is a scripting extension, get the Script * action and then load the script. Currently, <code>".js"</code> * is the only suffix supported. * * @param aName * @return the script action or an action corresponding to the given name * @exception Exception */ public Action getActionImpl(String aName) throws Exception { // Check for scripting extension if (aName.endsWith(".js")) { Script script = (Script)ActionFactory.getAction("Script"); script.setScript(aName); if (script.getScriptURL() == null) throw new IllegalArgumentException("Script '"+aName+"' does not exist"); return script; } else { return getNextFactory().getActionImpl(aName); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?