Inherited by ReportPage, ERD2WEditSortedManyToManyPage, ERD2WGraphVizPage, ERD2WInspectPage, ERD2WListPage, ERD2WMessagePage, ERD2WPickTypePage, ERD2WQueryEntitiesPage, ERD2WQueryPage, and ERMODEditRelationshipPage.

In the case of a non-tab page, we expect d2wContext.sectionsContents to return one of the three following formats: (( section1, key1, key2, key4 ), ( section2, key76, key 5, ..) .. ) OR with the sections enclosed in "()" - this is most useful with the WebAssistant ( "(section1)", key1, key2, key3, "(section2)", key3, key4, key5... ) OR with normal displayPropertyKeys array in fact if sectionContents isn't found then it will look for displayPropertyKeys ( key1, key2, key3, ... )
In the case of a TAB page, we expect d2wContext.tabSectionsContents to return one of the two following formats: ( ( tab1, key1, key2, key4 ), ( tab2, key76, key 5, ..) .. ) OR with sections ( ( tab1, ( section1, key1, key2 ..), (section3, key4, key..) ), ... ) OR with the alternate syntax, which ist most useful with the WebAssistant ( "[tab1]", "(section1)", key1, key2, ... "[tab2]", "(section3)", key4, key..... ) object localContext keyPathsWithValidationExceptions shouldPropagateExceptions shouldCollectionValidationExceptions shouldSetFailedValidationValue errorMessages componentName customComponentName propertyKey sectionKey sectionContents tabKey displayNameForTabKey isEntityEditable pageConfiguration displayPropertyKeys tabSectionsContents displayVariant displayNameForEntity nextPageDelegate pageController pageWrapperName inlineStyle
| ERD2WPage | ( | WOContext | c | ) |
Default public constructor.
| c | current context. |
Gets the CSS class(es) that should be applied to the current container element.
| cssKey | from the d2wContext that defines the CSS for this element |
| long aggregateEventDurationForCurrentPropertyKey | ( | ) |
Gets the aggregate duration of events sharing the current property key.
| static NSArray<String> allConfigurationNames | ( | ) | [static] |
Collects the names of all page configurations as you walk through your application.
| void appendToResponse | ( | WOResponse | response, | |
| WOContext | context | |||
| ) |
Overridden from the parent for better logging. Reports exceptions in the console for easier debugging.
Reimplemented in ReportPage, AjaxLookListPage, ERD2WAjaxMessagePageTemplate, ERDIVEditPage, ERDIVInspectPage, ERDIVListPage, ERDIVQueryPage, ERD2WEditSortedManyToManyPage, ERD2WGraphVizPage, ERD2WListComparePage, ERD2WListPage, ERD2WQueryPage, ERD2WTabInspectPage, and ERD2WWizardCreationPage.
| void awake | ( | ) |
Overridden to lock the page's editingContext, if there is any present.
Reimplemented in ERD2WQueryPage, ERD2WTabInspectPage, ERMODEditRelationshipPage, ERMODInspectPage, and ERMODWizardCreationPage.
| NSDictionary branch | ( | ) |
Cover method for getting the choosen branch.
| NSArray branchChoices | ( | ) |
Calculates the branch choices for the current page. This method is just a cover for calling the method branchChoicesForContext on the current ERDBranchDelegate.
| String branchName | ( | ) |
Implementation of the ERDBranchDelegate. Gets the user selected branch name.
Implements ERDBranchInterface.
| void clearTabSectionsContents | ( | ) | [protected] |
If you switch the context out from under a wizard page it will hold onto the keys in the tab sections and blow up the next time you use it if the entity has changed. This allows you to clear the array so it rebuilds.
| void clearValidationFailed | ( | ) |
Clears all of the collected validation exceptions. Implementation of the ERXExceptionHolder interface.
Implements ERXExceptionHolder.
Reimplemented in ERD2WEditableListPage.
| boolean clickToOpenEnabled | ( | WOResponse | response, | |
| WOContext | context | |||
| ) |
Returns whether or not click-to-open should be enabled for this component. By default this returns ERXClickToOpenSupport.isEnabled().
| response | the response | |
| context | the context |
| String cssClassForPageContainerElement | ( | ) |
Gets the CSS class(es) for the container element, based on the current entity and task.
| String cssClassForPropertyKey | ( | ) |
Gets the CSS class(es) that should be applied to the current property key container element.
| String cssClassForPropertyName | ( | ) |
Gets the CSS class(es) that should be applied to the current property name container element.
| ERD2WContainer currentSection | ( | ) |
The current section of display keys.
| NSArray currentSectionKeys | ( | ) |
The display keys for the current section. You bind to this method.
| ERD2WContainer currentTab | ( | ) |
Returns the ERD2WContainer defining the current tab.
| boolean d2wComponentNameDebuggingEnabled | ( | ) |
Checks is component names should be shown.
| D2WContext d2wContext | ( | ) |
D2WContext for this page. Checks if there is a "d2wContext" binding, too.
Reimplemented in ERMODWizardCreationPage.
| String d2wCurrentComponentName | ( | ) |
Helper to return the actual current component name, even when wrapped in a custom component.
| boolean d2wDebuggingEnabled | ( | ) |
Checks if basic debugging is on
| String descriptionForResponse | ( | WOResponse | aResponse, | |
| WOContext | aContext | |||
| ) |
This will allow d2w pages to be listed on a per configuration basis in stats collecting.
Reimplemented in ERD2WListPage.
| String displayVariant | ( | ) |
Gets the displayVariant for the current property key. The intention is that the display variant allows variation in the display method of property keys without needing different, slightly varying, displayPropertyKeys or tabSectionsContents rules. Template support has been added for the omit and blank variants. One could imagine others, such as collapsed, ajax, etc.
| EOEditingContext editingContext | ( | ) |
| NSArray<String> errorKeyOrder | ( | ) |
| String errorMessage | ( | ) |
| boolean hasActualChanges | ( | ) |
Returns true if the EC has "real" changes (processRecentChanges was called)
| boolean hasBranchChoices | ( | ) |
Determines if this message page should display branch choices.
| boolean hasErrors | ( | ) |
| boolean hasValidationExceptionForPropertyKey | ( | ) |
Checks if there is a validation exception in the D2WContext for the current property key.
| String inlineStyleDeclarationForPropertyKey | ( | ) |
Gets any inline style declarations for the current property key container element.
| String inlineStyleDeclarationForPropertyName | ( | ) |
Gets any inline style declarations for the current property name container element.
| WOActionResults invokeAction | ( | WORequest | r, | |
| WOContext | c | |||
| ) |
Overridden from the parent for better logging.
Reimplemented in ERD2WListPage.
| boolean isEmbedded | ( | ) |
| boolean isEntityEditable | ( | ) |
If the key isEntityEditable is set, then this value is used, otherwise the value from the super implementation, which checks if the entity is not in the list of readOnlyEntityNames.
Reimplemented in ERD2WListPage.
| boolean isEntityReadOnly | ( | ) |
True if the entity is read only. Returns !(isEntityEditable())
Reimplemented in ERD2WListPage.
| boolean isKeyOmitted | ( | ) |
Determines if display of the current property key should be omitted.
| boolean isObjectDeleteable | ( | ) |
Checks if the current object can be deleted.
| boolean isObjectEditable | ( | ) |
Checks if the current object can be edited.
| boolean isObjectInspectable | ( | ) |
Checks if the current object can be viewed.
| boolean isTopLevelPage | ( | ) |
| ERXStats.LogEntry latestEntryForCurrentPropertyKey | ( | ) |
Gets the latest metrics event for the current property key.
Makes the stats key, prepending a prefix to identify the stats to the originating page.
| key | to format |
| WOComponent nextPage | ( | ) |
Reimplemented in ERD2WEditableListPage, ERD2WInspectPage, and ERD2WPickTypePage.
| NextPageDelegate nextPageDelegate | ( | ) |
Returns the page's NextPageDelegate, if any, checking for a "nextPageDelegate" binding if no delegate has been explicitly set.
| WOComponent nextPageFromDelegate | ( | ) | [protected] |
Checks if the delegate is present and can be invoked, then returns the page from it.
| NSTimestamp now | ( | ) |
| EOEnterpriseObject object | ( | ) |
Return the object from the d2wContext.
| ERDBranchDelegateInterface pageController | ( | ) |
Returns the pageController for this page. If there is none given yet, tries to create one by querying the key "pageController" from the d2wContext. The most conventient way to set and use a pageController is via the rule system: Then ListWebSiteController would be:
100: (entity.name='WebSite') and (task = 'list') => pageController = "ListWebSiteController" [er.directtoweb.ERDDelayedObjectCreationAssignment]
100: (entity.name='WebSite') => actions = {left = (editAction, controllerAction);}
100: (propertyKey = 'controllerAction') => componentName = "ERDControllerButton"
public class ListWebSiteController extends ERDBranchDelegate {
private WOComponent _sender;
private WOComponent sender() {
return _sender;
}
private void setSender(WOComponent aSender) {
_sender = aSender;
}
private D2WContext d2wContext() {
return (D2WContext) sender().valueForKey("d2wContext");
}
private EOEnterpriseObject object() {
return (EOEnterpriseObject) d2wContext().valueForKey("object");
}
// first action, show up as "Copy Web Site"
public WOComponent copyWebSite(WOComponent sender) {
setSender(sender);
WOComponent result = ....
return result;
}
The nice thing about this is that this allows you to keep your logic confined to just a handful of classes, without the need to constantly create new components that just handle one action.
// second action, show up as "Delete Web Site"
public WOComponent deleteWebSite(WOComponent sender) {
setSender(sender);
WOComponent result = ....
return result;
}
}
| public<T extends WOComponent> T pageWithName | ( | Class< T > | componentClass | ) | [package] |
This variant of pageWithName provides a Java5 genericized version of the original pageWithName. You would call it with:
MyNextPage nextPage = pageWithName(MyNextPage.class);
| <T> | the type of component to create | |
| componentClass | the Class of the component to load |
| String pageWrapperName | ( | ) |
Gets the name of the page wrapper component. Overrides the superclass' implementation which caches the name too aggressively. This method allows you to drive the page wrapper component via the rules. Defaults to PageWrapper if a value is not found from the D2W rules.
| NSArray sectionsContents | ( | ) |
The array of sections. You bind to this method.
| NSArray sectionsForCurrentTab | ( | ) |
Returns the sections on the current tab.
| final WOComponent self | ( | ) |
Can be used to get this instance into KVC
| void setBranch | ( | NSDictionary | branch | ) |
Sets the user chosen branch.
| branch | chosen by user. |
| void setCurrentSection | ( | ERD2WContainer | value | ) |
Sets the current section of display keys.
| void setCurrentTab | ( | ERD2WContainer | value | ) |
Sets the current tab.
| void setD2wContext | ( | D2WContext | newValue | ) |
Key-Value-Coding needs this method. It should not be called
| void setDataSource | ( | EODataSource | eodatasource | ) |
Reimplemented in ERD2WListPage, and ERMODEditRelationshipPage.
| void setEditingContext | ( | EOEditingContext | newEditingContext | ) |
Sets the page's editingContext, automatically locking/unlocking it.
| newEditingContext | new EOEditingContext |
| void setErrorMessage | ( | String | message | ) |
| void setErrorMessages | ( | NSMutableDictionary< String, String > | value | ) |
| void setLocalContext | ( | D2WContext | newValue | ) |
Sets the d2wContext for this page
| void setNextPage | ( | WOComponent | wocomponent | ) |
| void setNextPageDelegate | ( | NextPageDelegate | nextpagedelegate | ) |
| void setObject | ( | EOEnterpriseObject | eo | ) |
Implementation of the InspectPageInterface
Reimplemented in ERD2WEditableListPage, ERD2WInspectPage, ERMODTabInspectPage, and ERMODWizardCreationPage.
| void setPageController | ( | ERDBranchDelegateInterface | aPageController | ) |
| NSDictionary settings | ( | ) |
Reimplemented in ERDIVListPage.
| boolean shouldCollectValidationExceptions | ( | ) |
Should exceptions also be handled here or only handled by the parent.
Reimplemented in ERD2WInspectPage.
| boolean shouldDisplayDetailedPageMetrics | ( | ) |
Determines whether the component should display the detailed "inline" page metrics.
| boolean shouldDisplayPageMetricsSummary | ( | ) |
Determines whether the component should display the page metrics summary. On display the summary for the top-level page by default, and for all pages when showing detailed metrics.
| boolean shouldPropagateExceptions | ( | ) |
Should exceptions be propagated through to the parent page. If false, the validation errors are not shown at all.
| boolean shouldSetFailedValidationValue | ( | ) |
Should incorrect values still be set into the EO. If not set, then the user must re-enter them.
| boolean showCancel | ( | ) |
Reimplemented in ERD2WEditableListPage, ERD2WInspectPage, ERD2WListPage, ERD2WPickListPage, ERD2WQueryPage, ERMODListPage, ERMODQueryPage, and ERMODWizardCreationPage.
| void sleep | ( | ) |
Overridden to unlock the page's editingContext, if there is any present.
Reimplemented in ERMODEditRelationshipPage.
| NSDictionary statsForPage | ( | ) |
Gets the stats for the current page.
| String statsKeyForCurrentPropertyKey | ( | ) |
Creates a stats key to identify stats to the current property key.
| String statsKeyPrefix | ( | ) |
A stats key prefix that guarantees the stats will be identifiable to this instance.
| NSArray<ERD2WContainer> tabSectionsContents | ( | ) |
Returns the array of ERD2WContainer defining the tabs. A tab is a key and an array of sections
| static NSArray tabSectionsContentsFromRuleResult | ( | NSArray | tabSectionContentsFromRule | ) | [static, protected] |
Helper method to calulate the tab key array
| void takeValuesFromRequest | ( | WORequest | r, | |
| WOContext | c | |||
| ) |
Overridden from the parent for better logging. Also clears validation errors
Reimplemented in ERD2WEditableListPage, ERD2WInspectPage, ERD2WListPage, and ERD2WQueryPage.
| ERD2WPage topLevelPage | ( | ) | [private] |
Gets the top level D2WPage.
| String urlForCurrentState | ( | ) |
Implementation of the ERXComponentActionRedirector.Restorable interface. This implementation creates an URL with the name of the current pageConfiguration as a direct action, which assumes a ERD2WDirectAction as the default direct action. Subclasses need to implement more sensible behaviour.
Implements ERXComponentActionRedirector.Restorable.
Reimplemented in ERD2WInspectPage, ERD2WListPage, and ERD2WTabInspectPage.
| NSMutableDictionary userInfo | ( | ) |
Implementation of the ERDUserInfoInterface
Implements ERDUserInfoInterface.
| Object userPreferencesValueForKey | ( | String | key | ) | [protected] |
Utility method to get a value from the user prefs.
| key |
| Object userPreferencesValueForPageConfigurationKey | ( | String | key | ) | [protected] |
Utility method to get a value for the current page configuration from the user prefs.
| key |
| void validationFailedWithException | ( | Throwable | e, | |
| Object | value, | |||
| String | keyPath | |||
| ) |
Handles validation errors.
Reimplemented in ERD2WEditableListPage.
final NSMutableSet<String> _allConfigurations = new NSMutableSet<String>() [static, protected] |
NSDictionary _branch [protected] |
holds the chosen branch
EOEditingContext _context [protected] |
EOEditingContext for the current object
ERD2WContainer _currentSection [private] |
Holds the current section of display keys.
ERD2WContainer _currentTab [private] |
Holds the current tab.
WOComponent _nextPage [protected] |
NextPageDelegate _nextPageDelegate [protected] |
final NSArray _NO_SECTIONS = new NSArray("") [static, private] |
Dummy denoting to sections.
ERDBranchDelegateInterface _pageController [protected] |
Holds the page controller for this page.
NSMutableArray _sectionsContents [private] |
Holds the section info
String _statsKeyPrefix [private] |
NSArray _tabSectionsContents [private] |
Holds the array of ERD2WContainer defining the tabs.
NSMutableDictionary<String,String> _temp = new NSMutableDictionary<String,String>() [private] |
Used to hold a cleaned-up validation key and message.
NSMutableDictionary _userInfo = new NSMutableDictionary() [protected] |
Holds the user info.
NSMutableArray<String> errorKeyOrder = new NSMutableArray<String>() [protected] |
String errorMessage = "" [protected] |
NSMutableDictionary<String,String> errorMessages = new NSMutableDictionary<String,String>() [protected] |
NSMutableArray<String> keyPathsWithValidationExceptions = new NSMutableArray<String>() [protected] |
final Logger log = Logger.getLogger(ERD2WPage.class) [static] |
logging support
Reimplemented in ERD2WEditableListPage, ERD2WEditSortedManyToManyPage, ERD2WInspectPage, ERD2WListPage, ERD2WMessagePage, ERD2WPickListPage, ERD2WPickTypePage, ERD2WProgressPage, ERD2WQueryEntitiesPage, ERD2WTabInspectPage, ERD2WWizardCreationPage, ERD2WProgressPageTemplate, and ERD2WGroupingListXMLPageTemplate.
final Logger validationLog = Logger.getLogger("er.directtoweb.validation.ERD2WPage") [static] |
Reimplemented in ERD2WTabInspectPage.
1.5.8