Documentation Archive Developer
Search
PATH Documentation > WebObjects

Table of Contents

EOEditingContext.Editors


(informal interface)
Package:
com.webobjects.eocontrol

Interface Description


The EOEditingContext.Editors interface defines methods for objects that act as higher-level editors of the objects an EOEditingContext contains. An editing context sends messages to its editors to determine whether they have any changes that need to be saved, and to allow them to flush pending changes before a save (possibly throwing an exception to abort the save). See the EOEditingContext and EODisplayGroup (EOInterface) class specifications for more information.

Editors are not required to provide implementations for all of the methods in the interface. When you write an editor, you don't have to use the implements keyword to specify that the object implements the Editors interface. Instead, simply use the EOEditingContext method addEditor method to assign your object as one of the EOEditingContext's editors and then declare and implement any subset of the methods declared in the Editors interface. An EOEditingContext can determine if the editor doesn't implement a method and only attempts to invoke the methods the editor actually implements.



Instance Methods



editingContextWillSaveChanges

public abstract void editingContextWillSaveChanges(EOEditingContext anEditingContext)

Invoked by anEditingContext in its saveChanges method, this method allows the receiver to flush any pending edits and, if necessary, prohibit a save operation. The receiver should validate and flush any unprocessed edits it has, throwing an exception if it can't do so to prevent anEditingContext from saving.

editorHasChangesForEditingContext

public abstract boolean editorHasChangesForEditingContext(EOEditingContext anEditingContext)

Invoked by anEditingContext, this method should return true if the receiver has any unapplied edits that need to be saved, false if it doesn't.

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


Table of Contents