|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectorg.apache.struts2.dispatcher.mapper.DefaultActionMapper
public class DefaultActionMapper
Default action mapper implementation, using the standard *.[ext] (where ext usually "action") pattern. The extension is looked up from the Struts configuration key struts.action.extension. To help with dealing with buttons and other related requirements, this mapper (and other
ActionMapper
s, we hope) has the ability to name a
button with some predefined prefix and have that button name alter the
execution behaviour. The four prefixes are:
<!-- START SNIPPET: method-example --> <s:form action="baz"> <s:textfield label="Enter your name" name="person.name"/> <s:submit value="Create person"/> <s:submit method="anotherMethod" value="Cancel"/> </s:form> <!-- END SNIPPET: method-example -->Action prefix With action-prefix, instead of executing baz action's execute() method (by default if it isn't overriden in struts.xml to be something else), the anotherAction action's execute() method (assuming again if it isn't overriden with something else in struts.xml) will be executed.
<!-- START SNIPPET: action-example --> <s:form action="baz"> <s:textfield label="Enter your name" name="person.name"/> <s:submit value="Create person"/> <s:submit action="anotherAction" value="Cancel"/> </s:form> <!-- END SNIPPET: action-example -->
构造方法摘要 | |
---|---|
DefaultActionMapper()
|
方法摘要 | |
---|---|
ActionMapping |
getMapping(javax.servlet.http.HttpServletRequest request,
com.opensymphony.xwork2.config.ConfigurationManager configManager)
Expose the ActionMapping for the current request |
ActionMapping |
getMappingFromActionName(String actionName)
Expose the ActionMapping for the specified action name |
String |
getUriFromActionMapping(ActionMapping mapping)
Convert an ActionMapping into a URI string |
void |
handleSpecialParameters(javax.servlet.http.HttpServletRequest request,
ActionMapping mapping)
Special parameters, as described in the class-level comment, are searched for and handled. |
boolean |
isSlashesInActionNames()
|
void |
setAllowActionCrossNamespaceAccess(String allowActionCrossNamespaceAccess)
|
void |
setAllowActionPrefix(String allowActionPrefix)
|
void |
setAllowDynamicMethodCalls(String allow)
|
void |
setAllowedActionNames(String allowedActionNames)
|
void |
setAlwaysSelectFullNamespace(String val)
|
void |
setContainer(com.opensymphony.xwork2.inject.Container container)
|
void |
setExtensions(String extensions)
|
void |
setSlashesInActionNames(String allow)
|
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public DefaultActionMapper()
方法详细信息 |
---|
public void setAllowDynamicMethodCalls(String allow)
public void setSlashesInActionNames(String allow)
public void setAlwaysSelectFullNamespace(String val)
public void setAllowedActionNames(String allowedActionNames)
public void setAllowActionPrefix(String allowActionPrefix)
public void setAllowActionCrossNamespaceAccess(String allowActionCrossNamespaceAccess)
public void setContainer(com.opensymphony.xwork2.inject.Container container)
public void setExtensions(String extensions)
public ActionMapping getMappingFromActionName(String actionName)
ActionMapper
复制的描述
ActionMapper
中的 getMappingFromActionName
actionName
- The name of the action that may have other information embedded in it
public boolean isSlashesInActionNames()
public ActionMapping getMapping(javax.servlet.http.HttpServletRequest request, com.opensymphony.xwork2.config.ConfigurationManager configManager)
ActionMapper
复制的描述
ActionMapper
中的 getMapping
request
- The servlet requestconfigManager
- The current configuration manager
public void handleSpecialParameters(javax.servlet.http.HttpServletRequest request, ActionMapping mapping)
request
- The requestmapping
- The action mappingpublic String getUriFromActionMapping(ActionMapping mapping)
ActionMapper
复制的描述
ActionMapper
中的 getUriFromActionMapping
mapping
- The action mapping
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |