public class ERDFlowDelegate extends 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 |
---|---|
com.webobjects.appserver.WOComponent |
currentComponent()
Returns the current component.
|
com.webobjects.appserver.WOComponent |
nextPage(com.webobjects.appserver.WOComponent sender)
Calls up nextPageFrom + pageName()
|
com.webobjects.appserver.WOComponent |
page()
Returns the current page.
|
protected <T> T |
page(Class<? extends T> clazz)
Returns the page cast as the supplied clazz.
|
protected String |
pageName()
Returns either the pageConfiguration of the topmost page or the name of
the topmost page.
|
protected <T> T |
parent(Class<? extends T> clazz)
Returns the innermost enclosing component that extends the supplied
clazz.
|
com.webobjects.appserver.WOSession |
session()
Returns the session.
|
protected void |
setCurrentComponent(com.webobjects.appserver.WOComponent current)
Set the current component.
|
protected void setCurrentComponent(com.webobjects.appserver.WOComponent current)
current
- public com.webobjects.appserver.WOComponent currentComponent()
public com.webobjects.appserver.WOComponent page()
public com.webobjects.appserver.WOSession session()
protected <T> T parent(Class<? extends T> clazz)
T
- clazz
- protected <T> T page(Class<? extends T> clazz)
T
- clazz
- protected String pageName()
public final com.webobjects.appserver.WOComponent nextPage(com.webobjects.appserver.WOComponent sender)
nextPage
in interface com.webobjects.directtoweb.NextPageDelegate
Copyright © 2002 – 2020 Project Wonder.