The Gravey 2.5 Framework

Class MVCScalarModel

Object
   |
   +--GrvObject
         |
         +--MVCObserver
               |
               +--MVCModel
                     |
                     +--MVCScalarModel
Direct Known Subclasses:
MVCAttributeModel, MVCSelectionModel, MVCBoolModel

class MVCScalarModel
extends MVCModel


This class encapsulates a Scalar data model with a default implementation of the scalar being implemented via a (bean-like) property. The property name can optionally be specified.

Scalar models assume that a validity attribute of the basic model value can also be set and it's member name is based on the name of the basic value's member name. By convention, the validity attribute consists of an error message string if invalid or null if valid.
Version: 2.0

Author: Bruce Wallace (PolyGlotInc.com)
Defined in grvMVC.js


Field Summary
<static>  Object kValiditySuffix
          The suffix added to the basic name to get the validity attribute name.
 
Constructor Summary
MVCScalarModel ()
           
 
Method Summary
 void _setValidity( <String> errMsg )
           set the validity attribute of this scalar value and dont publish
 void _setValue(x)
           set scalar to given value but dont publish
 String getValidity()
           return the validity attribute of this scalar value
 Object getValue( )
           get scalar value
 void konstructor( <String> optPropName, <String> optName )
          
 Object setValue(x)
           set scalar to given value and publish
 
Methods inherited from class MVCModel
dumpSubscribers, toString, dirty, clean, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
   
Methods inherited from class MVCObserver
update, subscribe
   
Methods inherited from class GrvObject
souper, souper_, isInstanceOf
 

Field Detail

kValiditySuffix

<static> Object kValiditySuffix

Constructor Detail

MVCScalarModel

MVCScalarModel()

Method Detail

_setValidity

void _setValidity( <String> errMsg )

_setValue

void _setValue(x)

getValidity

String getValidity()

getValue

Object getValue( )

konstructor

void konstructor( <String> optPropName, <String> optName )

setValue

Object setValue(x)

The Gravey 2.5 Framework

Documentation generated by JSDoc on Thu Jan 6 12:47:09 2011