er.extensions.appserver
Class ERXNextPageForResultWOAction
java.lang.Object
er.extensions.appserver.ERXAbstractPerformWOAction
er.extensions.appserver.ERXNextPageForResultWOAction
- All Implemented Interfaces:
- IERXPerformWOAction, IERXPerformWOActionForResult
public class ERXNextPageForResultWOAction
- extends ERXAbstractPerformWOAction
- implements IERXPerformWOActionForResult
A useful general purpose nextPage delegate that can be configured and passed into a 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.
- Author:
- kieran
Field Summary |
protected com.webobjects.appserver.WOComponent |
_nextPage
|
protected java.lang.Object |
_result
|
Method Summary |
com.webobjects.foundation.NSMutableDictionary<java.lang.String,?> |
nextPageValues()
|
com.webobjects.appserver.WOActionResults |
performAction()
|
void |
setResult(java.lang.Object result)
Provide a result object to the controller |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_result
protected java.lang.Object _result
_nextPage
protected final com.webobjects.appserver.WOComponent _nextPage
ERXNextPageForResultWOAction
public ERXNextPageForResultWOAction()
- Convenience constructor that calls
ERXNextPageForResultWOAction(WOComponent, String)
ERXNextPageForResultWOAction
public ERXNextPageForResultWOAction(com.webobjects.appserver.WOComponent nextPage)
- Convenience constructor that calls
ERXNextPageForResultWOAction(WOComponent, String)
- Parameters:
nextPage
-
ERXNextPageForResultWOAction
public ERXNextPageForResultWOAction(com.webobjects.appserver.WOComponent nextPage,
java.lang.String nextPageResultKey)
- Parameters:
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 nextPage
setResult
public void setResult(java.lang.Object result)
- Description copied from interface:
IERXPerformWOActionForResult
- Provide a result object to the controller
- Specified by:
setResult
in interface IERXPerformWOActionForResult
performAction
public com.webobjects.appserver.WOActionResults performAction()
- Specified by:
performAction
in interface IERXPerformWOAction
- Specified by:
performAction
in class ERXAbstractPerformWOAction
nextPageValues
public com.webobjects.foundation.NSMutableDictionary<java.lang.String,?> nextPageValues()
- Returns:
- a mutable dictionary whose values will be pushed into keys in the destination page that is returned by performAction
This can be useful for configuring the page that will be returned by this delegate after a long response page task
has completed.
For example, if you create a key
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.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2002 – 2007 Project Wonder.