Project Wonder 2.0

er.directtoweb
Class ERD2WListPage

java.lang.Object
  extended bycom.webobjects.appserver.WOElement
      extended bycom.webobjects.appserver.WOComponent
          extended bycom.webobjects.directtoweb.D2WComponent
              extended bycom.webobjects.directtoweb.D2WPage
                  extended byer.directtoweb.ERD2WPage
                      extended byer.directtoweb.ERD2WListPage
All Implemented Interfaces:
Cloneable, DTWGeneration, ERDBranchInterface, ERDListPageInterface, ERDUserInfoInterface, ERXComponentActionRedirector.Restorable, ERXExceptionHolder, ListPageInterface, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, SelectPageInterface, Serializable, WOActionResults
Direct Known Subclasses:
ERD2WCalendarPage, ERD2WCompactListPageTemplate, ERD2WCSVListPageTemplate, ERD2WEditableListPage, ERD2WGroupingListPage, ERD2WListComparePage, ERD2WListPageTemplate, ERD2WListXMLPage, ERD2WPickListPage, ERD2WPrinterFriendlyListTemplate

public class ERD2WListPage
extends ERD2WPage
implements ERDListPageInterface, SelectPageInterface, ERXComponentActionRedirector.Restorable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class er.directtoweb.ERD2WPage
ERD2WPage.Keys
 
Nested classes inherited from class com.webobjects.appserver.WOComponent
WOComponent._EventLoggingEnabler, WOComponent.Event
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
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  WODisplayGroup _displayGroup
          Holds the display group.
 boolean _hasToUpdate
           
protected  boolean _rowFlip
           
static ERXLogger log
          logging support
 EOEnterpriseObject referenceEO
           
 
Fields inherited from class er.directtoweb.ERD2WPage
_allConfigurations, _branch, _context, _nextPage, _nextPageDelegate, _userInfo, errorKeyOrder, errorMessage, errorMessages, keyPathsWithValidationExceptions, 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
ERD2WListPage(WOContext c)
          Public constructor.
 
Method Summary
 String alternatingColorForRow()
          Utility to have alternating row colors.
 void appendToResponse(WOResponse r, WOContext c)
          Overridden from the parent for better logging.
 WOComponent backAction()
           
 String backgroundColorForRow()
          The background color for the current row.
 String colorForRow()
           
 String defaultSortKey()
           
 WOComponent deleteObjectAction()
           
 String descriptionForResponse(WOResponse aResponse, WOContext aContext)
          This will allow d2w pages to be listed on a per configuration basis in stats collecting.
 WODisplayGroup displayGroup()
          Returns the display group, creating one if there is none present.
 void editingContextDidSaveChanges(NSNotification notif)
          Called when an EOditingContext has changed.
 WOComponent editObjectAction()
           
 void finalize()
          Override to un-register for stop obsevring notifcations.
 String formTargetJavaScriptUrl()
           
 WOComponent inspectObjectAction()
           
 WOActionResults invokeAction(WORequest r, WOContext c)
          Overridden from the parent for better logging.
 boolean isEntityEditable()
           
 boolean isEntityInspectable()
           
 boolean isEntityReadOnly()
          Checks if the entity is read only, meaning that you can't edit it's objects.
 boolean isListEmpty()
          Checks if the current list is empty.
 boolean isSelecting()
          Checks if the current task is select.
 boolean isSelectingNotTopLevel()
           
 int listSize()
          The number of objects in the list.
protected  EOEnterpriseObject localInstanceOfObject()
           
 int numberOfObjectsPerBatch()
           
 WOComponent printerFriendlyVersion()
           
static WOComponent printerFriendlyVersion(D2WContext d2wContext, WOSession session, EODataSource dataSource, WODisplayGroup displayGroup)
           
 NSArray referenceEOs()
           
 EOEnterpriseObject selectedObject()
          The currently selected object.
 WOComponent selectObjectAction()
          Action method to select an object.
 void setBackgroundColorForRow(String value)
          Does nothing and exists only for KeyValueCoding.
 void setDataSource(EODataSource eodatasource)
           
 void setSelectedObject(EOEnterpriseObject eo)
          Sets currently selected object.
protected  void setSortOrderingsOnDisplayGroup(NSArray sortOrderings, WODisplayGroup dg)
           
protected  void setupPhase()
           
 boolean shouldShowSelectAll()
           
 boolean showCancel()
           
 NSArray sortOrderings()
           
 void takeValuesFromRequest(WORequest r, WOContext c)
          Overridden from the parent for better logging.
 String targetString()
           
 String urlForCurrentState()
          end of reimplementation
 boolean userPreferencesCanSpecifySorting()
           
 void warmUpForDisplay()
           
 
Methods inherited from class er.directtoweb.ERD2WPage
allConfigurationNames, awake, branch, branchChoices, branchName, clearValidationFailed, currentSection, currentSectionKeys, currentTab, d2wComponentNameDebuggingEnabled, d2wContext, d2wCurrentComponentName, editingContext, errorMessage, errorMessages, hasBranchChoices, hasValidationExceptionForPropertyKey, isEmbedded, isObjectDeleteable, isObjectEditable, isObjectInspectable, nextPage, nextPageDelegate, now, sectionsContents, sectionsForCurrentTab, self, setBranch, setCurrentSection, setCurrentTab, setD2wContext, setEditingContext, setErrorMessage, setErrorMessages, setLocalContext, setNextPage, setNextPageDelegate, setObject, shouldCollectValidationExceptions, shouldPropagateExceptions, shouldSetFailedValidationValue, sleep, tabSectionsContents, tabSectionsContentsFromRuleResult, userInfo, validationFailedWithException
 
Methods inherited from class com.webobjects.directtoweb.D2WPage
alternateRowColor, dataSource, extraBindings, pageWrapperName, replacementAssociationForAssociation, setExtraBindings
 
Methods inherited from class com.webobjects.directtoweb.D2WComponent
allEntities, allowCollapsing, applicationPort, assistantPort, attribute, backgroundColorForHeaderRow, backgroundColorForPage, backgroundColorForTable, backgroundColorForTableDark, backgroundColorForTableLight, color, currentSettings, currentUrl, d2wContextVisibleEntityNamesCountPlus1, defaultRowspan, displayNameForKeyWhenRelationship, displayNameForProperty, displayPropertyKeys, dynamicPages, entity, entityName, formatter, generationReplacementFor, generationReplacementForCurrentObject, hasCustomKey, hasEntity, hasNoColor, homeClicked, homeHref, isEditing, isEntityReadOnly, isLiveAssistantEnabled, isNotBoldAsBoolean, isNotItalicAsBoolean, isPropertyAnAttribute, isWebAssistantActive, isWebAssistantConnected, isWebAssistantEnabled, keyForGenerationReplacementForVariableNamed, keyWhenRelationship, lastUrl, length, localContext, logout, object, objectPropertyValue, objectPropertyValueIsNonNull, pageTitle, property, propertyKey, propertyValueClassName, relationship, resourcePathURL, sessionID, setCurrentSettings, setDynamicPages, setEntities, setEntity, setEntityName, setPropertyKey, setResourcePathURL, setTask, setTasks, showBanner, showWebAssistant, submitActionName, target, task, tasks, visibleEntityNames
 
Methods inherited from class com.webobjects.appserver.WOComponent
_associationWithName, _awakeInContext, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webobjects.directtoweb.ListPageInterface
setNextPage, setNextPageDelegate
 
Methods inherited from interface com.webobjects.directtoweb.SelectPageInterface
nextPageDelegate, setNextPageDelegate
 

Field Detail

log

public static final ERXLogger log
logging support


_displayGroup

protected WODisplayGroup _displayGroup
Holds the display group.


_hasToUpdate

public boolean _hasToUpdate

_rowFlip

protected boolean _rowFlip

referenceEO

public EOEnterpriseObject referenceEO
Constructor Detail

ERD2WListPage

public ERD2WListPage(WOContext c)
Public constructor. Registers for EOEditingContext.EditingContextDidSaveChangesNotification so that component stays informed when objects are deleted and added.

Parameters:
c - current context
Method Detail

finalize

public void finalize()
              throws Throwable
Override to un-register for stop obsevring notifcations.

Throws:
Throwable

displayGroup

public WODisplayGroup displayGroup()
Returns the display group, creating one if there is none present.

Specified by:
displayGroup in interface ERDListPageInterface
Returns:
the displayGroup for this list page

editingContextDidSaveChanges

public void editingContextDidSaveChanges(NSNotification notif)
Called when an EOditingContext has changed. Sets _hasToUpdate which in turn lets the group refetch on the next display.


isEntityReadOnly

public boolean isEntityReadOnly()
Checks if the entity is read only, meaning that you can't edit it's objects.


isEntityEditable

public boolean isEntityEditable()

isSelecting

public boolean isSelecting()
Checks if the current task is select. We need this because this page implements the SelectPageInterface so we can't do an instanceof test.


isListEmpty

public boolean isListEmpty()
Checks if the current list is empty.


listSize

public int listSize()
The number of objects in the list.


alternatingColorForRow

public String alternatingColorForRow()
Utility to have alternating row colors. Override this to have more than one color.


backgroundColorForRow

public String backgroundColorForRow()
The background color for the current row. Override this to have more than one color.


setBackgroundColorForRow

public void setBackgroundColorForRow(String value)
Does nothing and exists only for KeyValueCoding.


selectedObject

public EOEnterpriseObject selectedObject()
The currently selected object.

Specified by:
selectedObject in interface SelectPageInterface

setSelectedObject

public void setSelectedObject(EOEnterpriseObject eo)
Sets currently selected object. Pushes the value to the display group, clearing the selection if needed.

Specified by:
setSelectedObject in interface SelectPageInterface

selectObjectAction

public WOComponent selectObjectAction()
Action method to select an object.


backAction

public WOComponent backAction()

urlForCurrentState

public String urlForCurrentState()
end of reimplementation

Specified by:
urlForCurrentState in interface ERXComponentActionRedirector.Restorable
Overrides:
urlForCurrentState in class ERD2WPage
Returns:
url for the current page

setSortOrderingsOnDisplayGroup

protected void setSortOrderingsOnDisplayGroup(NSArray sortOrderings,
                                              WODisplayGroup dg)

printerFriendlyVersion

public static WOComponent printerFriendlyVersion(D2WContext d2wContext,
                                                 WOSession session,
                                                 EODataSource dataSource,
                                                 WODisplayGroup displayGroup)

printerFriendlyVersion

public WOComponent printerFriendlyVersion()

descriptionForResponse

public String descriptionForResponse(WOResponse aResponse,
                                     WOContext aContext)
Description copied from class: ERD2WPage
This will allow d2w pages to be listed on a per configuration basis in stats collecting.

Overrides:
descriptionForResponse in class ERD2WPage

numberOfObjectsPerBatch

public int numberOfObjectsPerBatch()

userPreferencesCanSpecifySorting

public boolean userPreferencesCanSpecifySorting()

sortOrderings

public NSArray sortOrderings()

defaultSortKey

public String defaultSortKey()

takeValuesFromRequest

public void takeValuesFromRequest(WORequest r,
                                  WOContext c)
Description copied from class: ERD2WPage
Overridden from the parent for better logging. Also clears validation errors

Overrides:
takeValuesFromRequest in class ERD2WPage

invokeAction

public WOActionResults invokeAction(WORequest r,
                                    WOContext c)
Description copied from class: ERD2WPage
Overridden from the parent for better logging.

Overrides:
invokeAction in class ERD2WPage

appendToResponse

public void appendToResponse(WOResponse r,
                             WOContext c)
Description copied from class: ERD2WPage
Overridden from the parent for better logging. Reports exceptions in the console for easier debugging.

Overrides:
appendToResponse in class ERD2WPage

setDataSource

public void setDataSource(EODataSource eodatasource)
Specified by:
setDataSource in interface ListPageInterface
Overrides:
setDataSource in class ERD2WPage

setupPhase

protected void setupPhase()

isEntityInspectable

public boolean isEntityInspectable()

deleteObjectAction

public WOComponent deleteObjectAction()

editObjectAction

public WOComponent editObjectAction()

inspectObjectAction

public WOComponent inspectObjectAction()

localInstanceOfObject

protected EOEnterpriseObject localInstanceOfObject()

showCancel

public boolean showCancel()
Overrides:
showCancel in class ERD2WPage

isSelectingNotTopLevel

public boolean isSelectingNotTopLevel()

formTargetJavaScriptUrl

public String formTargetJavaScriptUrl()

targetString

public String targetString()

shouldShowSelectAll

public boolean shouldShowSelectAll()

warmUpForDisplay

public void warmUpForDisplay()

colorForRow

public String colorForRow()

referenceEOs

public NSArray referenceEOs()

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.