public class ERXNextPageForResultWOAction extends ERXAbstractPerformWOAction implements IERXPerformWOActionForResult
CCAjaxLongResponsePage
for handling a result
and returning the nextPage.
A result key can be provided for passing the successful result into the next page.
Note that if the result is a EOGlobalID
, since only a crazy person would return an EOEnterpriseObject
from a background thread, then a new editing context is automatically created and
the global ID is converted to an EOEnterpriseObject. The EOEnterpriseObject is in then passed into the next
page via the nextPageResultKey.
If a specific nextPage WOComponent is not set, the original page in which this controller was instantiated
will be returned by default.
Since everyone implements their own error handling, you may want to make your own version of this that checks for
a result that is instanceof Throwable in performAction()
and handles it appropriately since, right now,
error results only logged by this delegate.Modifier and Type | Field and Description |
---|---|
protected WOComponent |
_nextPage |
protected Object |
_result |
Constructor and Description |
---|
ERXNextPageForResultWOAction()
Convenience constructor that calls
ERXNextPageForResultWOAction(WOComponent, String) |
ERXNextPageForResultWOAction(WOComponent nextPage)
Convenience constructor that calls
ERXNextPageForResultWOAction(WOComponent, String) |
ERXNextPageForResultWOAction(WOComponent nextPage,
String nextPageResultKey) |
Modifier and Type | Method and Description |
---|---|
NSMutableDictionary<String,?> |
nextPageValues() |
WOActionResults |
performAction() |
void |
setResult(Object result)
Provide a result object to the controller
|
String |
toString() |
context, pageWithName
protected Object _result
protected final WOComponent _nextPage
public ERXNextPageForResultWOAction()
ERXNextPageForResultWOAction(WOComponent, String)
public ERXNextPageForResultWOAction(WOComponent nextPage)
ERXNextPageForResultWOAction(WOComponent, String)
nextPage
- public ERXNextPageForResultWOAction(WOComponent nextPage, String nextPageResultKey)
nextPage
- The page that should be returned by performAction()
.
Defaults to the page in the WOContext
in which this
class was created.nextPageResultKey
- The key in which to set the result in the nextPagepublic void setResult(Object result)
IERXPerformWOActionForResult
setResult
in interface IERXPerformWOActionForResult
public WOActionResults performAction()
performAction
in interface IERXPerformWOAction
performAction
in class ERXAbstractPerformWOAction
public NSMutableDictionary<String,?> nextPageValues()
isEditable
with a value Boolean.TRUE
in this mutable
dictionary, then when performAction is called, the method setIsEditable( Boolean ) will be called with a parameter
of Boolean.TRUE
on the destination page before that page is returned.Copyright © 2002 – 2024 Project Wonder.