public abstract class AbstractTemplateViewActionResult<T extends PathResult> extends java.lang.Object implements ActionResult<T>
| Modifier and Type | Field and Description |
|---|---|
protected ResultMapper |
resultMapper |
protected java.util.HashMap<java.lang.String,java.lang.String> |
targetCache |
| Constructor and Description |
|---|
AbstractTemplateViewActionResult() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String |
locateTarget(ActionRequest actionRequest,
java.lang.String path)
Locates target from given path.
|
void |
render(ActionRequest actionRequest,
T resultValue)
Dispatches to the JSP location created from result value and JSP extension.
|
protected abstract void |
renderView(ActionRequest actionRequest,
java.lang.String target)
Renders the view by processing founded target.
|
protected java.lang.String |
resolveTarget(ActionRequest actionRequest,
java.lang.String resultValue)
Locates the target file from action path and the result value.
|
protected void |
targetNotFound(ActionRequest actionRequest,
java.lang.String actionAndResultPath)
Called when target not found.
|
protected java.util.HashMap<java.lang.String,java.lang.String> targetCache
@In @Scope(value=CONTEXT) protected ResultMapper resultMapper
public void render(ActionRequest actionRequest, T resultValue) throws java.lang.Exception
RequestDispatcher. If the dispatch fails, a 404 error
will be sent back in the http response.render in interface ActionResult<T extends PathResult>actionRequest - action requestresultValue - action method result, may be null.java.lang.Exceptionprotected java.lang.String resolveTarget(ActionRequest actionRequest, java.lang.String resultValue)
protected abstract java.lang.String locateTarget(ActionRequest actionRequest, java.lang.String path)
null if target is not found.
Path may be modified in different ways to form the target. For example, various extensions
may be appended to the path and so on.protected abstract void renderView(ActionRequest actionRequest, java.lang.String target) throws java.lang.Exception
java.lang.Exceptionprotected void targetNotFound(ActionRequest actionRequest, java.lang.String actionAndResultPath) throws java.io.IOException
java.io.IOExceptionCopyright © 2003-present Jodd Team