This revision made July 08, 2011 14:46, by spix
« earlier revision revert to this « later revision

Data Model Change This interfaces informs registered controller(s) to a view of any changes that have been applied to the data model of a view. Based on the broadcased messages a Controller can take certain action based on the function and the actual object instances themself.

A typical but more complex example is the situation where a row from a table has been selected to be manipulated by a user in i.e. a detailed screen with a "Commit" button and during that change or modification process a message arrives that the designated row has been removed from the data model.

Data Model Change Observerable

This is the interface provided by a DataModel to allow controllers to registrate voor changes within that designated DataModel

     public interface GDataModelChangedObserverable<  B> {
            void add(DataModelChangedListener< B > listener);
            void remove(DataModelChangedListener< B > listener);
     }


Data Model Change Listener

This is the interface that normally Controllers will implement to receive changes within a certain DataModel

     public interface DataModelChangedListener< B > {
            void accept(DataModelChangedEvent< B > modelChanged);
     }


Data Model Change Event

The registered Controller(s) will receive messages that contain the changes that have been applied to the designated DataModel

     public interface DataModelChangedEvent< B > {
            Set< B > getAdded();
            Set< B > getDeleted();
            Set< B > getUpdated();
     }

Note a datamodel will have at least one object in either Added, Deleted or updated Set's.

Difference compared to previous revision
''Data Model Change'' This interfaces informs registered controller(s) to a view of any changes that have been applied to the data model of a view. Based on the broadcased messages a Controller can take certain action based on the function and the actual object instances themself. A typical but more complex example is the situation where a row from a table has been selected to be manipulated by a user in i.e. a detailed screen with a "Commit" button and during that change or modification process a message arrives that the designated row has been removed from the data model. == Data Model Change Observerable This is the interface provided by a DataModel to allow controllers to registrate voor changes within that designated DataModel