public class ERDFlowDelegate
extends java.lang.Object
implements com.webobjects.directtoweb.NextPageDelegate
public class CreateAssetWithSelectionDelegate extends ERDFlowDelegate {
public WOComponent nextPageFromSelectAssetGroups() {
ERD2WListPage page = parent(ERD2WListPage.class)
if(page.selectedObjects().count() > 0)
...
return D2W.factory.pageForConfigurationNamed("CreateAsset");
return page.pageWithName("MaybeNextTimePage");
}
public WOComponent nextPageFromCreateAsset() {
ERD2WInspectPage page = parent(ERD2WInspectPage.class)
if(page.wasObjectSaved())
return page.pageWithName("ThankYouPage");
return page.pageWithName("MaybeNextTimePage");
}
}
...
D2WPage page = D2W.factory.pageForConfigurationNamed("SelectAssetGroups");
page.setNextPageDelegate(new CreateAssetWithSelectionDelegate())
...
| Constructor and Description |
|---|
ERDFlowDelegate() |
| Modifier and Type | Method and Description |
|---|---|
WOComponent |
currentComponent()
Returns the current component.
|
WOComponent |
nextPage(WOComponent sender)
Calls up nextPageFrom + pageName()
|
WOComponent |
page()
Returns the current page.
|
protected <T> T |
page(java.lang.Class<? extends T> clazz)
Returns the page cast as the supplied clazz.
|
protected java.lang.String |
pageName()
Returns either the pageConfiguration of the topmost page or the name of
the topmost page.
|
protected <T> T |
parent(java.lang.Class<? extends T> clazz)
Returns the innermost enclosing component that extends the supplied
clazz.
|
WOSession |
session()
Returns the session.
|
protected void |
setCurrentComponent(WOComponent current)
Set the current component.
|
protected void setCurrentComponent(WOComponent current)
current - public WOComponent currentComponent()
public WOComponent page()
public WOSession session()
protected <T> T parent(java.lang.Class<? extends T> clazz)
T - clazz - protected <T> T page(java.lang.Class<? extends T> clazz)
T - clazz - protected java.lang.String pageName()
public final WOComponent nextPage(WOComponent sender)
nextPage in interface com.webobjects.directtoweb.NextPageDelegateCopyright © 2002 – 2022 Project Wonder.