Project Wonder 5.0

er.directtoweb.pages
Class ERD2WEditableListPage

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by com.webobjects.directtoweb.D2WComponent
              extended by com.webobjects.directtoweb.D2WPage
                  extended by er.directtoweb.pages.ERD2WPage
                      extended by er.directtoweb.pages.ERD2WListPage
                          extended by er.directtoweb.pages.ERD2WEditableListPage
All Implemented Interfaces:
com.webobjects.appserver.WOActionResults, com.webobjects.directtoweb.generation.DTWGeneration, com.webobjects.directtoweb.ListPageInterface, com.webobjects.directtoweb.SelectPageInterface, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation, ERDBranchInterface, ERDListPageInterface, ERDObjectSaverInterface, ERDUserInfoInterface, ERXComponentActionRedirector.Restorable, ERXExceptionHolder, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ERD2WEditableListTemplate

public class ERD2WEditableListPage
extends ERD2WListPage
implements ERXExceptionHolder, ERDObjectSaverInterface

List page for editing all items in the list. Name your page EditListYourEntityName. task will be edit, subTask will be list. See Component ERD2WEditableListTemplate for html/wod example. There is a "mass change" feature that can apply a change to all displayed objects. Think of it as an "input assistant". The changes are not saved when propagated, and the rows can be updated individually after a mass change has been applied. (Note: There is a ERDMassModifyButton class that may be more appropriate depending on your needs) To enable the mass change feature on an editable list page, do the following: 1/ Add a "showMassChange" rule that returns "true" for your edit list page 2/ If you want to restrict the keys that can be "mass edited", add a displayPropertyKeys rule with a restricted set of keys with the qualifer "(massChangeEntityDisplay = 1)" Known Issues: changing the number of items per batch causes problems (the display group's batch is updated too soon in the request/response loop)

See Also:
Serialized Form
D2W Keys
showBannershowBanner
           
objectobject
           
isEntityInspectableisEntityInspectable
           
shouldValidateBeforeSaveshouldValidateBeforeSave
           
shouldSaveChangesshouldSaveChanges
           
shouldRecoverFromOptimisticLockingFailureshouldRecoverFromOptimisticLockingFailure
           
saveLabelTemplateKeysaveLabelTemplateKey
           
displayNameForEntitydisplayNameForEntity
           
showMassChangeshowMassChange
           

Nested Class Summary
 class ERD2WEditableListPage.ERDMassChangeGenericRecord
           
 
Nested classes/interfaces inherited from class er.directtoweb.pages.ERD2WPage
ERD2WPage.Keys
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
protected  com.webobjects.appserver.WODisplayGroup _massChangeDisplayGroup
           
protected  ERD2WEditableListPage.ERDMassChangeGenericRecord _massChangeEO
           
 java.lang.String dummy
           
static org.apache.log4j.Logger log
           
static java.lang.String MassChangeEntityDisplayKey
           
 
Fields inherited from class er.directtoweb.pages.ERD2WListPage
_displayGroup, _hasToUpdate, _rowFlip, _sessionID, _shouldRefetch, dataSourceState, referenceEO
 
Fields inherited from class er.directtoweb.pages.ERD2WPage
_allConfigurations, _branch, _context, _nextPage, _nextPageDelegate, _pageController, _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.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
ERD2WEditableListPage(com.webobjects.appserver.WOContext context)
           
 
Method Summary
 com.webobjects.appserver.WOComponent backAction()
           
 com.webobjects.appserver.WOComponent cancel()
           
 com.webobjects.appserver.WOComponent clearMassChangeEO()
           
 void clearValidationFailed()
          Clears all of the collected validation exceptions.
 int colspanForNavBar()
           
 com.webobjects.foundation.NSMutableDictionary currentErrorDictionary()
           
 com.webobjects.directtoweb.D2WContext d2wContextForMassChangeEO()
           
 com.webobjects.foundation.NSMutableDictionary errorDictionaryForObject(java.lang.Object object)
           
protected  com.webobjects.foundation.NSMutableDictionary errorMessagesDictionaries()
           
 boolean isEntityInspectable()
           
 com.webobjects.appserver.WODisplayGroup massChangeDisplayGroup()
           
 ERD2WEditableListPage.ERDMassChangeGenericRecord massChangeEO()
           
 com.webobjects.appserver.WOComponent nextPage()
           
 int numberOfObjectsPerBatch()
           
 boolean objectWasSaved()
           
 java.lang.String propagateChangesDetails()
           
 com.webobjects.appserver.WOComponent propagateChangesToVisibleObjects()
           
 com.webobjects.appserver.WOComponent saveAction()
           
 java.lang.String saveLabel()
           
 void setObject(com.webobjects.eocontrol.EOEnterpriseObject eo)
          Implementation of the InspectPageInterface
 boolean shouldRecoverFromOptimisticLockingFailure()
           
 boolean shouldSaveChanges()
           
 boolean shouldShowMassChange()
           
 boolean shouldValidateBeforeSave()
           
 boolean showCancel()
          Should we show the cancel button? It's only visible when we have a nextPage set up.
 void takeValuesFromRequest(com.webobjects.appserver.WORequest r, com.webobjects.appserver.WOContext c)
          Overridden from the parent for better logging.
 boolean tryToSaveChanges(boolean validateObjects)
           
 com.webobjects.appserver.WOComponent update()
           
 void validationFailedWithException(java.lang.Throwable e, java.lang.Object value, java.lang.String keyPath)
          Handles validation errors.
 
Methods inherited from class er.directtoweb.pages.ERD2WListPage
_fetchDisplayGroup, alternatingColorForRow, alwaysRefetchList, appendToResponse, backgroundColorForRow, checkSortOrderingKeys, colorForRow, createDisplayGroup, defaultSortKey, deleteObjectAction, descriptionForResponse, didUpdate, displayGroup, editingContextDidSaveChanges, editObjectAction, fetchIfNecessary, formTargetJavaScriptUrl, inspectObjectAction, invokeAction, isEntityEditable, isEntityPrintable, isEntityReadOnly, isListEmpty, isSelecting, isSelectingNotTopLevel, isValidSortKey, listSize, localInstanceOfObject, printerFriendlyVersion, printerFriendlyVersion, referenceEOs, selectedObject, selectedObjects, selectObjectAction, sessionID, setBackgroundColorForRow, setDataSource, setSelectedObject, setSelectedObjects, setSortOrderingsOnDisplayGroup, setupPhase, shouldShowBatchNavigation, shouldShowSelectAll, sortOrderings, targetString, urlForCurrentState, useBatchingDisplayGroup, userPreferencesCanSpecifySorting, warmUpForDisplay, willUpdate
 
Methods inherited from class er.directtoweb.pages.ERD2WPage
aggregateEventDurationForCurrentPropertyKey, allConfigurationNames, awake, branch, branchChoices, branchName, clearTabSectionsContents, clickToOpenEnabled, cssClassForPageContainerElement, cssClassForPropertyKey, cssClassForPropertyName, currentSection, currentSectionKeys, currentTab, d2wComponentNameDebuggingEnabled, d2wContext, d2wCurrentComponentName, d2wDebuggingEnabled, displayVariant, editingContext, errorKeyOrder, errorMessage, errorMessages, hasActualChanges, hasBranchChoices, hasErrors, hasValidationExceptionForPropertyKey, inlineStyleDeclarationForPropertyKey, inlineStyleDeclarationForPropertyName, isEmbedded, isKeyOmitted, isObjectDeleteable, isObjectEditable, isObjectInspectable, isTopLevelPage, latestEntryForCurrentPropertyKey, makeStatsKey, nextPageDelegate, nextPageFromDelegate, now, object, pageController, pageWithName, pageWrapperName, sectionsContents, sectionsForCurrentTab, self, setBranch, setCurrentSection, setCurrentTab, setD2wContext, setEditingContext, setErrorMessage, setErrorMessages, setLocalContext, setNextPage, setNextPageDelegate, setPageController, settings, shouldCollectValidationExceptions, shouldDisplayDetailedPageMetrics, shouldDisplayPageMetricsSummary, shouldPropagateExceptions, shouldSetFailedValidationValue, sleep, statsForPage, statsKeyForCurrentPropertyKey, statsKeyPrefix, tabSectionsContents, tabSectionsContentsFromRuleResult, userInfo, userPreferencesValueForKey, userPreferencesValueForPageConfigurationKey
 
Methods inherited from class com.webobjects.directtoweb.D2WPage
alternateRowColor, dataSource, extraBindings, finalize, 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, objectPropertyValue, objectPropertyValueIsNonNull, pageTitle, property, propertyKey, propertyValueClassName, relationship, resourcePathURL, 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 org.apache.log4j.Logger log

dummy

public java.lang.String dummy

MassChangeEntityDisplayKey

public static final java.lang.String MassChangeEntityDisplayKey
See Also:
Constant Field Values

_massChangeDisplayGroup

protected com.webobjects.appserver.WODisplayGroup _massChangeDisplayGroup

_massChangeEO

protected ERD2WEditableListPage.ERDMassChangeGenericRecord _massChangeEO
Constructor Detail

ERD2WEditableListPage

public ERD2WEditableListPage(com.webobjects.appserver.WOContext context)
Method Detail

colspanForNavBar

public int colspanForNavBar()

numberOfObjectsPerBatch

public int numberOfObjectsPerBatch()
Overrides:
numberOfObjectsPerBatch in class ERD2WListPage

objectWasSaved

public boolean objectWasSaved()
Specified by:
objectWasSaved in interface ERDObjectSaverInterface

errorMessagesDictionaries

protected com.webobjects.foundation.NSMutableDictionary errorMessagesDictionaries()

errorDictionaryForObject

public com.webobjects.foundation.NSMutableDictionary errorDictionaryForObject(java.lang.Object object)

currentErrorDictionary

public com.webobjects.foundation.NSMutableDictionary currentErrorDictionary()

showCancel

public boolean showCancel()
Description copied from class: ERD2WListPage
Should we show the cancel button? It's only visible when we have a nextPage set up.

Overrides:
showCancel in class ERD2WListPage

isEntityInspectable

public boolean isEntityInspectable()
Overrides:
isEntityInspectable in class ERD2WListPage

setObject

public void setObject(com.webobjects.eocontrol.EOEnterpriseObject eo)
Description copied from class: ERD2WPage
Implementation of the InspectPageInterface

Overrides:
setObject in class ERD2WPage

backAction

public com.webobjects.appserver.WOComponent backAction()
Overrides:
backAction in class ERD2WListPage

nextPage

public com.webobjects.appserver.WOComponent nextPage()
Overrides:
nextPage in class ERD2WPage

shouldValidateBeforeSave

public boolean shouldValidateBeforeSave()

shouldSaveChanges

public boolean shouldSaveChanges()

shouldRecoverFromOptimisticLockingFailure

public boolean shouldRecoverFromOptimisticLockingFailure()

tryToSaveChanges

public boolean tryToSaveChanges(boolean validateObjects)

saveAction

public com.webobjects.appserver.WOComponent saveAction()

cancel

public com.webobjects.appserver.WOComponent cancel()

validationFailedWithException

public void validationFailedWithException(java.lang.Throwable e,
                                          java.lang.Object value,
                                          java.lang.String keyPath)
Description copied from class: ERD2WPage
Handles validation errors.

Overrides:
validationFailedWithException in class ERD2WPage

clearValidationFailed

public void clearValidationFailed()
Description copied from class: ERD2WPage
Clears all of the collected validation exceptions. Implementation of the ERXExceptionHolder interface.

Specified by:
clearValidationFailed in interface ERXExceptionHolder
Overrides:
clearValidationFailed in class ERD2WPage

update

public com.webobjects.appserver.WOComponent update()

takeValuesFromRequest

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

Overrides:
takeValuesFromRequest in class ERD2WListPage

saveLabel

public java.lang.String saveLabel()

shouldShowMassChange

public boolean shouldShowMassChange()

d2wContextForMassChangeEO

public com.webobjects.directtoweb.D2WContext d2wContextForMassChangeEO()

massChangeDisplayGroup

public com.webobjects.appserver.WODisplayGroup massChangeDisplayGroup()

massChangeEO

public ERD2WEditableListPage.ERDMassChangeGenericRecord massChangeEO()

clearMassChangeEO

public com.webobjects.appserver.WOComponent clearMassChangeEO()

propagateChangesToVisibleObjects

public com.webobjects.appserver.WOComponent propagateChangesToVisibleObjects()

propagateChangesDetails

public java.lang.String propagateChangesDetails()

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.