public abstract class AbstractTemplateViewActionResult extends java.lang.Object implements ActionResult
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,
java.lang.Object resultValue)
Dispatches to the template 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 abstract PathResult |
resultOf(java.lang.Object value)
Converts different types to path result.
|
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 @MadvocContext protected ResultMapper resultMapper
public void render(ActionRequest actionRequest, java.lang.Object 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
actionRequest
- action requestresultValue
- action method result, may be null
or any type.java.lang.Exception
protected 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.Exception
protected abstract PathResult resultOf(java.lang.Object value)
protected void targetNotFound(ActionRequest actionRequest, java.lang.String actionAndResultPath) throws java.io.IOException
java.io.IOException
Copyright © 2003-present Jodd Team