public abstract class ERDBranchDelegate extends Object implements ERDBranchDelegateInterface
ERDMessagePageInterface
to allow
flexible branching for message pages. Branch delegates can
only be used with templates that implement the
ERDBranchInterface
.Modifier and Type | Class and Description |
---|---|
static interface |
ERDBranchDelegate.D2WDelegate
Runtime flags for the delegate, so you can have one delegate for all tasks.
|
Modifier and Type | Field and Description |
---|---|
static String |
BRANCH_BUTTON_ID |
static String |
BRANCH_CHOICES |
static String |
BRANCH_LABEL |
static String |
BRANCH_NAME |
static String |
BRANCH_PREFIX |
static Logger |
log
logging support
|
static Class[] |
WOComponentClassArray
holds the WOComponent class array used to lookup branch delegate methods
|
Constructor and Description |
---|
ERDBranchDelegate() |
Modifier and Type | Method and Description |
---|---|
protected NSDictionary |
branchChoiceDictionary(String method,
String label)
Utility to build branch choice dictionaries in code.
|
NSArray |
branchChoicesForContext(com.webobjects.directtoweb.D2WContext context)
Calculates which branches to show in the display first
asking the context for the key branchChoices.
|
protected NSArray |
choiceByLeavingKeys(NSArray keys,
NSArray choices)
Utility to leave entries based on an array of keys
|
protected NSArray |
choiceByRemovingKeys(NSArray keys,
NSArray choices)
Utility to remove entries based on an array of keys
|
protected com.webobjects.directtoweb.D2WContext |
d2wContext(com.webobjects.appserver.WOComponent sender)
Gets the D2W context from the innermost enclosing D2W component of the sender.
|
protected NSArray |
defaultBranchChoices(com.webobjects.directtoweb.D2WContext context)
Uses reflection to find all of the public methods that don't start with
an underscore and take a single WOComponent as a parameter are returned.
|
com.webobjects.appserver.WOComponent |
nextPage(com.webobjects.appserver.WOComponent sender)
Implementation of the
NextPageDelegate
interface. |
protected com.webobjects.eocontrol.EOEnterpriseObject |
object(com.webobjects.directtoweb.D2WContext context)
Returns the current object form the d2w context
|
protected com.webobjects.eocontrol.EOEnterpriseObject |
object(com.webobjects.appserver.WOComponent sender)
return the innermost object which might be of interest
|
public static final Logger log
public static final Class[] WOComponentClassArray
public static final String BRANCH_CHOICES
public static final String BRANCH_BUTTON_ID
public static final String BRANCH_NAME
public static final String BRANCH_LABEL
public static final String BRANCH_PREFIX
public final com.webobjects.appserver.WOComponent nextPage(com.webobjects.appserver.WOComponent sender)
NextPageDelegate
interface. This method provides the dynamic dispatch based on
the selected branch provided by the sender. Will call the
method <branchName>(WOComponent) on itself returning the
result.nextPage
in interface com.webobjects.directtoweb.NextPageDelegate
sender
- template invoking the branch delegateprotected NSDictionary branchChoiceDictionary(String method, String label)
method
- name of the method in questionlabel
- label for the button, a beautified method name will be used if set to null.public NSArray branchChoicesForContext(com.webobjects.directtoweb.D2WContext context)
branchChoicesForContext
in interface ERDBranchDelegateInterface
context
- current D2W contextprotected NSArray defaultBranchChoices(com.webobjects.directtoweb.D2WContext context)
context
- current D2W contextprotected com.webobjects.directtoweb.D2WContext d2wContext(com.webobjects.appserver.WOComponent sender)
sender
- protected com.webobjects.eocontrol.EOEnterpriseObject object(com.webobjects.appserver.WOComponent sender)
sender
- protected com.webobjects.eocontrol.EOEnterpriseObject object(com.webobjects.directtoweb.D2WContext context)
context
- protected NSArray choiceByRemovingKeys(NSArray keys, NSArray choices)
keys
- choices
- Copyright © 2002 – 2020 Project Wonder.