org.apache.struts.chain.commands
abstract public class: AbstractSelectAction [javadoc |
source]
java.lang.Object
org.apache.struts.chain.commands.ActionCommandBase
org.apache.struts.chain.commands.AbstractSelectAction
All Implemented Interfaces:
ActionCommand
Direct Known Subclasses:
SelectAction
Cache the ActionConfig instance for the action to be used
for processing this request.
- version:
$ - Rev: 471754 $ $Date: 2005-11-05 21:44:59 -0500 (Sat, 05 Nov 2005)
$
| Method from org.apache.struts.chain.commands.AbstractSelectAction Summary: |
|---|
|
execute, getPath |
| Methods from org.apache.struts.chain.commands.ActionCommandBase: |
|---|
|
execute, execute |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.apache.struts.chain.commands.AbstractSelectAction Detail: |
public boolean execute(ActionContext actionCtx) throws Exception {
// Identify the matching path for this request
String path = getPath(actionCtx);
// Cache the corresponding ActonConfig instance
ModuleConfig moduleConfig = actionCtx.getModuleConfig();
ActionConfig actionConfig = moduleConfig.findActionConfig(path);
if (actionConfig == null) {
// NOTE Shouldn't this be the responsibility of ModuleConfig?
// Locate the mapping for unknown paths (if any)
ActionConfig[] configs = moduleConfig.findActionConfigs();
for (int i = 0; i < configs.length; i++) {
if (configs[i].getUnknown()) {
actionConfig = configs[i];
break;
}
}
}
if (actionConfig == null) {
throw new InvalidPathException("No action config found for the specified url.",
path);
}
actionCtx.setActionConfig(actionConfig);
return (false);
}
|
abstract protected String getPath(ActionContext context)
|