Documentation Archive Developer
Search
PATH Documentation > WebObjects

Table of Contents

EOEditable


Implemented by:
EOAssociationController,
EODocumentController,
EORangeValueController
Package:
com.webobjects.eoapplication

Interface Description


EOEditable is an interface that defines an API for managing the editability of a branch of the controller hierarchy. EOEditable controllers usually base the editability of their user interfaces on the editability of their supercontrollers. Thus, by default all the EOEditable subcontrollers of an editable controller are also editable. To enable or disable a portion of an application's user interface, you need only message the highest level controller associated with that user interface.



Constants


EOEditable defines the following int constants to identify the editability of an EOEditable controller:


Constant Description
NeverEditable The controller is never editable.
AlwaysEditable The controller is always editable.
IfSupercontrollerEditable The controller is editable only if its supercontroller is editable. If none of the controller's ancestors implement EOEditable, then its the same as if the controller is AlwaysEditable.



Instance Methods



editability

public abstract int editability()

Returns the editability of the receiver, one of NeverEditable, AlwaysEditable, or IfSupercontrollerEditable. The default behavior should be to return IfSupercontrollerEditable.

isEditable

public abstract boolean isEditable()

Returns true if the receiver is editable, and false otherwise. The default behavior should be to return true if the receiver is currently editable. The receiver is editable if:

setEditability

public abstract void setEditability(int editability)

Sets the receiver's editability to editability, one of NeverEditable, AlwaysEditable, or IfSupercontrollerEditable.

supercontrollerEditabilityDidChange

public abstract void supercontrollerEditabilityDidChange()

Invoked to notify the receiver that the editability of its supercontroller changed, giving the receiver the opportunity to update its user interface to match the editability of the supercontroller.

takeResponsibilityForEditabilityOfAssociation

public abstract void takeResponsibilityForEditabilityOfAssociation( com.webobjects.eointerface.EOAssociation association)

Invoked when one of the receiver's subcontrollers is disposed as a transient controller. This method instructs the receiver to assume responsibility for managing the editability of the subcontroller's EOAssociation, association.

© 2001 Apple Computer, Inc. (Last Published April 14, 2001)


Table of Contents