Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, neverChanged, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, reloaded, addObserver, delObserver, notifyObservers`

Methods inherited from class MVCObserver
`update, subscribe`

Methods inherited from class GrvObject
`souper`

Field Detail

### kValiditySuffix

    <static> Object kValiditySuffix

The suffix added to the basic name to get the validity attribute name.

Constructor Detail

### MVCScalarModel

    MVCScalarModel()

Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)

Method Detail

### _setValidity

    void _setValidity( <String> errMsg )

set the validity attribute of this scalar value and dont publish

Parameters:

`errMsg` - the validity attribute (as an error message)

### _setValue

    void _setValue(x)

set scalar to given value but dont publish

### getValidity

    String getValidity()

return the validity attribute of this scalar value

### getValue

    Object getValue( )

get scalar value

### konstructor

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

Parameters:

`optPropName` - optional property name to use instead of default

`optName` - optional name of this instance

### setValue

    Object setValue(x)

set scalar to given value and publish

Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Sun Feb 11 13:31:25 2007