WebObjects 5.2

com.webobjects.eocontrol
Interface EOEditingContext.Editor

Enclosing class:
EOEditingContext

public static interface EOEditingContext.Editor

An interface 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.


Method Summary
 void editingContextWillSaveChanges(EOEditingContext context)
          Invoked by context in its saveChanges method, this method allows the editor to flush any pending edits and, if necessary, prohibit a save operation.
 boolean editorHasChangesForEditingContext(EOEditingContext context)
          Invoked by context, this method should return true if the editor has any unapplied edits that need to be saved and false if it does not.
 

Method Detail

editingContextWillSaveChanges

public void editingContextWillSaveChanges(EOEditingContext context)
Invoked by context in its saveChanges method, this method allows the editor to flush any pending edits and, if necessary, prohibit a save operation. The editor should validate and flush any unprocessed edits it has, throwing an exception if it cannot.
Parameters:
context - The target EOEditingContext

editorHasChangesForEditingContext

public boolean editorHasChangesForEditingContext(EOEditingContext context)
Invoked by context, this method should return true if the editor has any unapplied edits that need to be saved and false if it does not.
Parameters:
context - The target EOEditingContext
Returns:
true if unapplied edits exist for context

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.