The Gravy Framework

Class Model

Object
   |
   +--OObject
         |
         +--Observer
               |
               +--Model
Direct Known Subclasses:
ListModel, MapModel, ScalarModel

class Model
extends Observer


This abstract class acts as the base class for each MVC data model; Since models can subscribe to other models, they can act as both Observer and Observable. This class implements the Observable interface.
Author: Bruce Wallace (PolyGlotInc.com)
Defined in mvc.js

Version: 1.0


Constructor Summary
Model ()
           
 
Method Summary
 void _SET(property,value)
           generic "bean" property SETTER (w/o publish)
 void addObserver( observer )
           Observable API
 void BeginTransaction()
           inhibit publishing until matching EndTransaction() called
 void clean()
           clear the "dirty" flag that says "there has been a change to this model since the last update event broadcase via publish()"
 void delObserver( observer )
          
 void dirty()
           set the "dirty" and "everChanged" flags to true
 void dumpSubscribers()
           debug method generating alert with subscriber list
 void EndTransaction(<boolean> totalReload)
           publish a "batch" of updates
 Object GET(property )
           generic "bean" property GETTER
 void konstructor( <String> optName )
          
 void neverChanged()
           return current value of funky "everChanged" flag
 void notifyObservers( <Object> optAdhocObj )
           if "dirty" flag is set, Notify all subscribers of change to our state; When done, if we were the initiator of the cascade of update events (ie if global transaction depth is back to zero when we are done), then the views will be redrawn.
 void publish( <boolean> resetMark, <Object> optAdhocObj )
           tell observers that we have changed
 boolean SET(property,value)
           generic "bean" property SETTER (w/publish)
 String toString()
           return "this" formatted as string
 void updateStamp()
           update the timestamp on this model
 
Methods inherited from class Observer
update, subscribe
 

Constructor Detail

Model

Model()

Method Detail

_SET

void _SET(property,value)

addObserver

void addObserver( observer )

BeginTransaction

void BeginTransaction()

clean

void clean()

delObserver

void delObserver( observer )

dirty

void dirty()

dumpSubscribers

void dumpSubscribers()

EndTransaction

void EndTransaction(<boolean> totalReload)

GET

Object GET(property )

konstructor

void konstructor( <String> optName )

neverChanged

void neverChanged()

notifyObservers

void notifyObservers( <Object> optAdhocObj )

publish

void publish( <boolean> resetMark, <Object> optAdhocObj )

SET

boolean SET(property,value)

toString

String toString()

updateStamp

void updateStamp()

The Gravy Framework

Documentation generated by JSDoc on Fri Mar 17 06:40:21 2006