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 MVCScalarView

    Object
       |
       +--GrvObject
             |
             +--MVCView
                   |
                   +--MVCScalarView

Direct Known Subclasses:
  MVCPadScalarView

class MVCScalarView
extends MVCView

This class produces a view of the specified MVCScalarModel. It accepts an optional formatter function specification that will transform the raw value of the model into a desired format. This formatter function should accept one parameter (the value) and return a formatted string version of that value.
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Defined in grvMVC.js

Constructor Summary
`MVCScalarView ()`

Method Summary
`String` | `buildHTMLstr( )` return an HTML string of the basic structure for this view.
`String` | `formatted(x)` return the formatted version of the given value using our formatter function (where the raw value is returned if no formatter is registered)
`String` | `getValueStr( )` return the current value of our model formatted with our formatter
`void` | `konstructor( <MVCScalarModel> xModel, <Function> optFormatFunction, <String> optName )`
`void` | `paintHTML( )` update/modify attributes of basic existing HTML for THIS view
`void` | `setDisplay(x)` set the value of our display "widget"
`void` | `updateView( )` update the display with the current model value

Methods inherited from class MVCView
`mustRebuild, mustRepaint, currentContext, watchModel, setViewID, innerID, getWidgetID, getWidget, getHook, buildHTML, updateContext, contextChanged, disable, enable, setVisible, setSubViewsVisible, isVisible, redraw, draw, rebuildAny, build, buildsubviews, paint, setParentView, clearSubViews, addSubView, getSubView, delSubView, embedView, embedHTML, embedAttr, block, unblock`

Methods inherited from class GrvObject
`souper`

Constructor Detail

### MVCScalarView

    MVCScalarView()

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

- konstructor()

Method Detail

### buildHTMLstr

    String buildHTMLstr( )

return an HTML string of the basic structure for this view. As a side effect, build/update subview list for this view. As a side effect, invoke this method on each nested subview.

Returns:

HTML (suitable for assigning to innerHTML)

### formatted

    String formatted(x)

return the formatted version of the given value using our formatter function (where the raw value is returned if no formatter is registered)

### getValueStr

    String getValueStr( )

return the current value of our model formatted with our formatter

### konstructor

    void konstructor( <MVCScalarModel> xModel, <Function> optFormatFunction, <String> optName )

Parameters:

`xModel` - the data model to view

`optFormatFunction` - optional formatter function

`optName` - optional name of this instance

### paintHTML

    void paintHTML( )

update/modify attributes of basic existing HTML for THIS view

### setDisplay

    void setDisplay(x)

set the value of our display "widget"

### updateView

    void updateView( )

update the display with the current model value

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