|
Project Wonder 5.0.0.8794 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
com.webobjects.directtoweb.D2WComponent
com.webobjects.directtoweb.D2WPage
er.directtoweb.pages.ERD2WPage
public abstract class ERD2WPage
Common superclass for all ERD2W templates (except ERD2WEditRelationshipPage).
Has tons of extra functionality:
ERDBranchDelegate, then all of the
code for actions can be handled in your delegate.
| Nested Class Summary | |
|---|---|
static interface |
ERD2WPage.Keys
interface for all the keys used in this pages code |
| Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent |
|---|
WOComponent._EventLoggingEnabler, WOComponent.Event |
| Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
|---|
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility |
| Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
|---|
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException |
| Field Summary | |
|---|---|
protected static NSMutableSet |
_allConfigurations
|
protected NSDictionary |
_branch
holds the chosen branch |
protected EOEditingContext |
_context
EOEditingContext for the current object |
protected WOComponent |
_nextPage
|
protected NextPageDelegate |
_nextPageDelegate
|
protected ERDBranchDelegateInterface |
_pageController
Holds the page controller for this page. |
protected NSMutableDictionary |
_userInfo
Holds the user info. |
protected NSMutableArray |
errorKeyOrder
|
protected String |
errorMessage
|
protected NSMutableDictionary |
errorMessages
|
protected NSMutableArray |
keyPathsWithValidationExceptions
|
static Logger |
log
logging support |
static Logger |
validationLog
|
| Fields inherited from class com.webobjects.directtoweb.D2WComponent |
|---|
_eo, _localContext, currentObjectKey |
| Fields inherited from class com.webobjects.appserver.WOComponent |
|---|
_Extension, _IsEventLoggingEnabled, _keyAssociations, MINUSONE |
| Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling |
|---|
_CLASS |
| Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
|---|
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator |
| Fields inherited from interface com.webobjects.foundation.NSValidation |
|---|
_CLASS |
| Constructor Summary | |
|---|---|
ERD2WPage(WOContext c)
Default public constructor. |
|
| Method Summary | ||
|---|---|---|
static NSArray |
allConfigurationNames()
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. |
|
void |
awake()
Overridden to lock the page's editingContext, if there is any present. |
|
NSDictionary |
branch()
Cover method for getting the choosen branch. |
|
NSArray |
branchChoices()
Calculates the branch choices for the current page. |
|
String |
branchName()
Implementation of the ERDBranchDelegate. |
|
void |
clearValidationFailed()
Clears all of the collected validation exceptions. |
|
boolean |
clickToOpenEnabled(WOResponse response,
WOContext context)
Returns whether or not click-to-open should be enabled for this component. |
|
ERD2WContainer |
currentSection()
The current section of display keys. |
|
NSArray |
currentSectionKeys()
The display keys for the current section. |
|
ERD2WContainer |
currentTab()
Returns the ERD2WContainer defining the current tab. |
|
boolean |
d2wComponentNameDebuggingEnabled()
Checks is component names should be shown. |
|
D2WContext |
d2wContext()
D2WContext for this page. |
|
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. |
|
EOEditingContext |
editingContext()
|
|
NSArray |
errorKeyOrder()
|
|
String |
errorMessage()
|
|
NSMutableDictionary |
errorMessages()
|
|
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 |
hasValidationExceptionForPropertyKey()
Checks if there is a validation exception in the D2WContext for the current property key. |
|
WOActionResults |
invokeAction(WORequest r,
WOContext c)
Overridden from the parent for better logging. |
|
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. |
|
boolean |
isEntityReadOnly()
True if the entity is read only. |
|
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. |
|
WOComponent |
nextPage()
|
|
NextPageDelegate |
nextPageDelegate()
Returns the page's NextPageDelegate,
if any, checking for a "nextPageDelegate" binding if no delegate
has been explicitly set. |
|
protected WOComponent |
nextPageFromDelegate()
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. |
|
|
pageWithName(Class<T> componentClass)
This variant of pageWithName provides a Java5 genericized version of the original pageWithName. |
|
String |
pageWrapperName()
Gets the name of the page wrapper component. |
|
NSArray |
sectionsContents()
The array of sections. |
|
NSArray |
sectionsForCurrentTab()
Returns the sections on the current tab. |
|
WOComponent |
self()
Can be used to get this instance into KVC |
|
void |
setBranch(NSDictionary branch)
Sets the user choosen branch. |
|
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. |
|
void |
setDataSource(EODataSource eodatasource)
|
|
void |
setEditingContext(EOEditingContext newEditingContext)
Sets the page's editingContext, automatically locking/unlocking it. |
|
void |
setErrorMessage(String message)
|
|
void |
setErrorMessages(NSMutableDictionary 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 |
|
void |
setPageController(ERDBranchDelegateInterface aPageController)
|
|
NSDictionary |
settings()
|
|
boolean |
shouldCollectValidationExceptions()
Should exceptions also be handled here or only handled by the parent. |
|
boolean |
shouldPropagateExceptions()
Should exceptions be propagated through to the parent page. |
|
boolean |
shouldSetFailedValidationValue()
Should incorrect values still be set into the EO. |
|
boolean |
showCancel()
|
|
void |
sleep()
Overridden to unlock the page's editingContext, if there is any present. |
|
NSArray |
tabSectionsContents()
Returns the array of ERD2WContainer defining the tabs. |
|
protected static NSArray |
tabSectionsContentsFromRuleResult(NSArray tabSectionContentsFromRule)
Helper method to calulate the tab key array |
|
void |
takeValuesFromRequest(WORequest r,
WOContext c)
Overridden from the parent for better logging. |
|
String |
urlForCurrentState()
Implementation of the ERXComponentActionRedirector$Restorable
interface. |
|
NSMutableDictionary |
userInfo()
Implementation of the ERDUserInfoInterface |
|
protected Object |
userPreferencesValueForKey(String key)
Utility method to get a value from the user prefs. |
|
protected Object |
userPreferencesValueForPageConfigurationKey(String key)
Utility method to get a value for the current page configuration from the user prefs. |
|
void |
validationFailedWithException(Throwable e,
Object value,
String keyPath)
Handles validation errors. |
|
| Methods inherited from class com.webobjects.directtoweb.D2WPage |
|---|
alternateRowColor, dataSource, extraBindings, finalize, replacementAssociationForAssociation, setExtraBindings |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Logger log
public static final Logger validationLog
protected EOEditingContext _context
EOEditingContext for the current object
protected NSMutableDictionary errorMessages
protected NSMutableArray errorKeyOrder
protected NSMutableArray keyPathsWithValidationExceptions
protected String errorMessage
protected NSMutableDictionary _userInfo
protected static NSMutableSet _allConfigurations
protected NSDictionary _branch
protected WOComponent _nextPage
protected NextPageDelegate _nextPageDelegate
protected ERDBranchDelegateInterface _pageController
| Constructor Detail |
|---|
public ERD2WPage(WOContext c)
c - current context.| Method Detail |
|---|
public void awake()
awake in class WOComponentpublic boolean clickToOpenEnabled(WOResponse response, WOContext context)
response - the responsecontext - the context
protected Object userPreferencesValueForKey(String key)
key - protected Object userPreferencesValueForPageConfigurationKey(String key)
key - public void sleep()
sleep in class WOComponentpublic void setEditingContext(EOEditingContext newEditingContext)
newEditingContext - new EOEditingContextpublic EOEditingContext editingContext()
public boolean hasActualChanges()
public String urlForCurrentState()
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.
urlForCurrentState in interface ERXComponentActionRedirector.Restorablepublic void setObject(EOEnterpriseObject eo)
InspectPageInterface
setObject in class D2WComponentpublic EOEnterpriseObject object()
object in class D2WComponentpublic void setDataSource(EODataSource eodatasource)
setDataSource in class D2WPagepublic final WOComponent self()
public D2WContext d2wContext()
D2WContext for this page. Checks if there is a "d2wContext"
binding, too.
d2wContext in class D2WComponentpublic void setD2wContext(D2WContext newValue)
public void setLocalContext(D2WContext newValue)
setLocalContext in class D2WComponentpublic NSMutableDictionary errorMessages()
public void setErrorMessages(NSMutableDictionary value)
public String errorMessage()
public void setErrorMessage(String message)
public NSArray errorKeyOrder()
public boolean shouldPropagateExceptions()
public boolean shouldCollectValidationExceptions()
public void clearValidationFailed()
ERXExceptionHolder interface.
clearValidationFailed in interface ERXExceptionHolderpublic boolean shouldSetFailedValidationValue()
public void validationFailedWithException(Throwable e, Object value, String keyPath)
validationFailedWithException in class WOComponentpublic boolean isObjectEditable()
public boolean isObjectDeleteable()
public boolean isObjectInspectable()