|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts2.dispatcher.StrutsResultSupport
org.apache.struts2.dispatcher.PostbackResult
public class PostbackResult
A result that renders the current request parameters as a form which immediately submits a postback to the specified destination.
Parameters:
<action name="registerThirdParty" >
<result type="postback">https://www.example.com/register</result>
</action>
<action name="registerThirdParty" >
<result type="postback">
<param name="namespace">/secure</param>
<param name="actionName">register2</param>
</result>
</action>
| Field Summary | |
|---|---|
protected ActionMapper |
actionMapper
|
| Fields inherited from class org.apache.struts2.dispatcher.StrutsResultSupport |
|---|
DEFAULT_PARAM, DEFAULT_URL_ENCODING |
| Fields inherited from interface org.apache.struts2.StrutsStatics |
|---|
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT |
| Constructor Summary | |
|---|---|
PostbackResult()
|
|
| Method Summary | |
|---|---|
protected void |
doExecute(String finalLocation,
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(ActionInvocation invocation)
Implementation of the execute method from the Result interface. |
protected boolean |
isElementIncluded(String name,
String[] values)
Determines if the specified form input element should be included. |
protected String |
makePostbackUri(ActionInvocation invocation)
|
void |
setActionMapper(ActionMapper mapper)
|
void |
setActionName(String actionName)
Sets the name of the destination action. |
void |
setCache(boolean cache)
Stores the option to cache the rendered intermediate page. |
void |
setMethod(String method)
Sets the method of the destination action. |
void |
setNamespace(String namespace)
Sets the namespace of the destination action. |
void |
setPrependServletContext(boolean prependServletContext)
|
protected void |
writeFormElement(PrintWriter pw,
String name,
String[] values)
|
protected void |
writePrologueScript(PrintWriter pw)
Outputs the script after the form has been emitted. |
| Methods inherited from class org.apache.struts2.dispatcher.StrutsResultSupport |
|---|
conditionalParse, conditionalParseCollection, getLastFinalLocation, getLocation, setEncode, setLocation, setParse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ActionMapper actionMapper
| Constructor Detail |
|---|
public PostbackResult()
| Method Detail |
|---|
protected void doExecute(String finalLocation,
ActionInvocation invocation)
throws Exception
StrutsResultSupport
doExecute in class StrutsResultSupportfinalLocation - 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.
public void execute(ActionInvocation invocation)
throws Exception
StrutsResultSupportStrutsResultSupport.doExecute(String, ActionInvocation) after optionally evaluating the
location as an OGNL evaluation.
execute in interface Resultexecute in class StrutsResultSupportinvocation - the execution state of the action.
Exception - if an error occurs while executing the result.
protected boolean isElementIncluded(String name,
String[] values)
name - the input element namevalues - the input element values
true if included; otherwise falseprotected String makePostbackUri(ActionInvocation invocation)
public final void setActionMapper(ActionMapper mapper)
public final void setActionName(String actionName)
actionName - the action namepublic final void setCache(boolean cache)
true.
public final void setMethod(String method)
method - the methodpublic final void setNamespace(String namespace)
namespace - the namespacepublic final void setPrependServletContext(boolean prependServletContext)
protected void writeFormElement(PrintWriter pw,
String name,
String[] values)
throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected void writePrologueScript(PrintWriter pw)
pw - the print writer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||