|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.appserver.WOElement com.webobjects.appserver.WOComponent com.webobjects.directtoweb.D2WComponent com.webobjects.directtoweb.D2WPage er.directtoweb.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 inherited from class com.webobjects.appserver.WOComponent |
WOComponent._EventLoggingEnabler, WOComponent.Event |
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions |
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility |
Nested classes inherited from class 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 NSMutableDictionary |
_userInfo
Holds the user info. |
protected NSMutableArray |
errorKeyOrder
|
protected String |
errorMessage
|
protected NSMutableDictionary |
errorMessages
|
protected NSMutableArray |
keyPathsWithValidationExceptions
|
static ERXLogger |
log
logging support |
static ERXLogger |
validationLog
|
Fields inherited from class com.webobjects.directtoweb.D2WComponent |
_eo, _localContext, currentObjectKey |
Fields inherited from class com.webobjects.appserver.WOComponent |
_Extension, _IsEventLoggingEnabled, _keyAssociations |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
_CLASS, NullValue |
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 NSSet |
allConfigurationNames()
|
void |
appendToResponse(WOResponse r,
WOContext c)
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. |
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. |
String |
descriptionForResponse(WOResponse aResponse,
WOContext aContext)
This will allow d2w pages to be listed on a per configuration basis in stats collecting. |
EOEditingContext |
editingContext()
|
String |
errorMessage()
|
NSMutableDictionary |
errorMessages()
|
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 |
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()
|
NSTimestamp |
now()
|
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 |
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 |
void |
validationFailedWithException(Throwable e,
Object value,
String keyPath)
Handles validation errors. |
Methods inherited from class com.webobjects.directtoweb.D2WPage |
alternateRowColor, dataSource, extraBindings, finalize, pageWrapperName, replacementAssociationForAssociation, setExtraBindings |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ERXLogger log
public static final ERXLogger 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
Constructor Detail |
public ERD2WPage(WOContext c)
c
- current context.Method Detail |
public void awake()
public void sleep()
public void setEditingContext(EOEditingContext newEditingContext)
newEditingContext
- new EOEditingContextpublic EOEditingContext editingContext()
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.Restorable
public void setObject(EOEnterpriseObject eo)
InspectPageInterface
public void setDataSource(EODataSource eodatasource)
public final WOComponent self()
public D2WContext d2wContext()
D2WContext
for this page. Checks if there is a "d2wContext" binding, too.
public void setD2wContext(D2WContext newValue)
public void setLocalContext(D2WContext newValue)
public NSMutableDictionary errorMessages()
public void setErrorMessages(NSMutableDictionary value)
public String errorMessage()
public void setErrorMessage(String message)
public boolean shouldPropagateExceptions()
public boolean shouldCollectValidationExceptions()
public void clearValidationFailed()
ERXExceptionHolder
interface.
clearValidationFailed
in interface ERXExceptionHolder
public boolean shouldSetFailedValidationValue()
public void validationFailedWithException(Throwable e, Object value, String keyPath)
public boolean isObjectEditable()
public boolean isObjectDeleteable()
public boolean isObjectInspectable()
public boolean hasValidationExceptionForPropertyKey()
public NSMutableDictionary userInfo()
ERDUserInfoInterface
userInfo
in interface ERDUserInfoInterface
public boolean d2wComponentNameDebuggingEnabled()
public String d2wCurrentComponentName()
public String descriptionForResponse(WOResponse aResponse, WOContext aContext)
public void takeValuesFromRequest(WORequest r, WOContext c)
public WOActionResults invokeAction(WORequest r, WOContext c)
public static NSSet allConfigurationNames()
public void appendToResponse(WOResponse r, WOContext c)
public NSDictionary branch()
public void setBranch(NSDictionary branch)
branch
- choosen by user.public String branchName()
ERDBranchDelegate
.
Gets the user selected branch name.
branchName
in interface ERDBranchInterface
public NSArray branchChoices()
branchChoicesForContext
on the current ERDBranchDelegate
.
public boolean hasBranchChoices()
public ERD2WContainer currentSection()
public void setCurrentSection(ERD2WContainer value)
public NSArray currentSectionKeys()
ERD2WContainer
holding the keys for the current sectionpublic NSArray sectionsContents()
ERD2WContainer
holding the keys.public NSArray tabSectionsContents()
ERD2WContainer
defining the tabs. A tab is a key and an array of sections
public NSArray sectionsForCurrentTab()
public ERD2WContainer currentTab()
ERD2WContainer
defining the current tab.
public void setCurrentTab(ERD2WContainer value)
protected static NSArray tabSectionsContentsFromRuleResult(NSArray tabSectionContentsFromRule)
public boolean isEmbedded()
public NSTimestamp now()
public WOComponent nextPage()
public void setNextPage(WOComponent wocomponent)
public NextPageDelegate nextPageDelegate()
public void setNextPageDelegate(NextPageDelegate nextpagedelegate)
public boolean showCancel()
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |