|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.webwork.dispatcher.WebWorkResultSupport
A base class for all WebWork action execution results. The "location" param is the default parameter, meaning the most common usage of this result would be:
This class provides two common parameters for any subclass:translateVariables
method<result name="success" type="redirect"> <param name="location">foo.jsp</param> </result>or
<result name="success" type="redirect" > <param name="location">foo.jsp</param> <param name="parse">false</param> </result>or when using the default parameter feature
<result name="success" type="redirect">foo.jsp</result>You should subclass this class if you're interested in adding more parameters or functionality to your Result. If you do subclass this class you will need to override
doExecute(String, ActionInvocation)
.Any custom result can be defined in xwork.xml as:
<result-types> ... <result-type name="myresult" class="com.foo.MyResult" /> </result-types>Please see the
Result
class for more info on Results in general.
Result
,
Serialized FormField Summary | |
static String |
DEFAULT_PARAM
|
protected boolean |
parse
|
Fields inherited from interface com.opensymphony.webwork.WebWorkStatics |
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERLVET_DISPATCHER, SERVLET_CONFIG, SERVLET_DISPATCHER |
Constructor Summary | |
WebWorkResultSupport()
|
Method Summary | |
protected String |
conditionalParse(String param,
com.opensymphony.xwork.ActionInvocation invocation)
|
protected abstract void |
doExecute(String finalLocation,
com.opensymphony.xwork.ActionInvocation invocation)
Executes the result given a final location (jsp page, action, etc) and the action invocation (the state in which the action was executed). |
void |
execute(com.opensymphony.xwork.ActionInvocation invocation)
Implementation of the execute method from the Result interface. |
void |
setLocation(String location)
The location to go to after action execution. |
void |
setParse(boolean parse)
Set parse to true to indicate that the location should be parsed as an OGNL expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DEFAULT_PARAM
protected boolean parse
Constructor Detail |
public WebWorkResultSupport()
Method Detail |
public void setLocation(String location)
location
- the location to go to after action execution.setParse(boolean)
public void setParse(boolean parse)
parse
- true if the location parameter is an OGNL expression, false otherwise.public void execute(com.opensymphony.xwork.ActionInvocation invocation) throws Exception
doExecute(String, ActionInvocation)
after optionally evaluating the
location as an OGNL evaluation.
execute
in interface com.opensymphony.xwork.Result
invocation
- the execution state of the action.
Exception
- if an error occurs while executing the result.protected String conditionalParse(String param, com.opensymphony.xwork.ActionInvocation invocation)
protected abstract void doExecute(String finalLocation, com.opensymphony.xwork.ActionInvocation invocation) throws Exception
finalLocation
- the location (jsp page, action, etc) to go to.invocation
- the execution state of the action.
Exception
- if an error occurs while executing the result.
|
WebWork Project Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |