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

## Class EDOSelectedModel

    Object
       |
       +--GrvObject
             |
             +--MVCObserver
                   |
                   +--MVCModel
                         |
                         +--MVCScalarModel
                               |
                               +--MVCBoolModel
                                     |
                                     +--EDOSelectedModel

class EDOSelectedModel
extends MVCBoolModel

This class encapsulates the data model for the flag indicating whether an editable domain object (EDO) is selected from a set of EDOs in an EDOHolderModel. One and only one EDO can be selected at a time. This model also keeps track of which EDO is selected. If a new EDOHolder is selected (thus loading new data) "this" gets reset to false (i.e nothing selected).
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Defined in grvEDO.js

Constructor Summary
`EDOSelectedModel ()`

Method Summary
`void` | `_select( <EDOIndex> edoIndex )` select the specified EDO
`void` | `_unselect()` change to "nothing selected"
`void` | `appendSelected( <EDOIndex> xi )` insert new EDO at end of EDO list and select it
`String` | `canCreateSelected(<boolean> appendFlag,<EDOIndex> optIndex)` Is it legal to create selected EDO?
`String` | `canDeleteSelected()` Is it legal to delete selected EDO?
`String` | `canEdit(<EDOIndex> xi)` Is it legal to edit specified EDO?
`String` | `canEditSelected()` Is it legal to edit selected EDO?
`boolean` | `canUncreateSelected(<boolean> appendFlag,<EDOIndex> optIndex)` If created, can we undo creation?
`void` | `deleteSelected()` delete selected editable domain object
`void` | `editSelected()` edit selected editable domain object
`void` | `forceFlag(f)` force the "something is selected" flag to specified value and publish
`EDO` | `getEDO(<EDOIndex> optXI)` return the specified EDO (or current selection if not specified)
`EDOIndex` | `getIndex()` return the selected EDOIndex
`EDO` | `getSelected()` return the selected EDO or null if none selected
`boolean` | `hasSelection()` return whether an EDO is selected
`boolean` | `inEdit(<EDOIndex> optXI)` return whether specified editable is in edit mode
`boolean` | `isSelected( <EDOIndex> edoIndex )` return whether specified EDO is selected
`void` | `konstructor( edoHolderModel, <Function> edoIndexClass, <String> optName )`
`void` | `newAfterSelected()` insert new EDO after selected EDO and select it
`void` | `select(<EDOIndex> xi)` select (and publish) the specified EDO
`void` | `toggleSelect(<EDOIndex> xi)` Make the specified EDO selected, unless it is currently selected then merely deselect it.
`void` | `undelete(<EDOIndex> xi)` undelete specified editable domain object
`void` | `uneditSelected()` unedit selected editable
`void` | `unselect()` _unselect() and publish
`void` | `update()` handle update events from the EDOHolder Selection Model

Methods inherited from class MVCBoolModel
`isTrue, setFlag`

Methods inherited from class MVCScalarModel
`_setValue, setValue, getValue, _setValidity, getValidity`

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
`subscribe`

Methods inherited from class GrvObject
`souper, souper_, isInstanceOf`

Constructor Detail

### EDOSelectedModel

    EDOSelectedModel()

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

- konstructor()

Method Detail

### _select

    void _select( <EDOIndex> edoIndex )

select the specified EDO

Parameters:

`edoIndex` - edo index

### _unselect

    void _unselect()

change to "nothing selected"

### appendSelected

    void appendSelected( <EDOIndex> xi )

insert new EDO at end of EDO list and select it

Parameters:

`xi` - edo index

### canCreateSelected

    String canCreateSelected(<boolean> appendFlag,<EDOIndex> optIndex)

Is it legal to create selected EDO?

Parameters:

`appendFlag` - iff true this is an append else insert

`optIndex` - optional index to use

Returns:

errmsg or null

### canDeleteSelected

    String canDeleteSelected()

Is it legal to delete selected EDO?

Returns:

errmsg or null

### canEdit

    String canEdit(<EDOIndex> xi)

Is it legal to edit specified EDO?

Parameters:

`xi` - edo index

Returns:

errmsg or null

### canEditSelected

    String canEditSelected()

Is it legal to edit selected EDO?

Returns:

errmsg or null

### canUncreateSelected

    boolean canUncreateSelected(<boolean> appendFlag,<EDOIndex> optIndex)

If created, can we undo creation?

Parameters:

`appendFlag` - iff true this is an append else insert

`optIndex` - optional index to use

### deleteSelected

    void deleteSelected()

delete selected editable domain object

### editSelected

    void editSelected()

edit selected editable domain object

### forceFlag

    void forceFlag(f)

force the "something is selected" flag to specified value and publish

### getEDO

    EDO getEDO(<EDOIndex> optXI)

return the specified EDO (or current selection if not specified)

Parameters:

`optXI` - optional edo index

### getIndex

    EDOIndex getIndex()

return the selected EDOIndex

### getSelected

    EDO getSelected()

return the selected EDO or null if none selected

### hasSelection

    boolean hasSelection()

return whether an EDO is selected

### inEdit

    boolean inEdit(<EDOIndex> optXI)

return whether specified editable is in edit mode

Parameters:

`optXI` - optional edo index

### isSelected

    boolean isSelected( <EDOIndex> edoIndex )

return whether specified EDO is selected

Parameters:

`edoIndex` - edo index

### konstructor

    void konstructor( edoHolderModel, <Function> edoIndexClass, <String> optName )

Parameters:

`edoIndexClass` - the class/function of the EDOIndex to use

`optName` - optional name of this instance

`edoHolder` - model containing EDO set

### newAfterSelected

    void newAfterSelected()

insert new EDO after selected EDO and select it

### select

    void select(<EDOIndex> xi)

select (and publish) the specified EDO

Parameters:

`xi` - edo index

### toggleSelect

    void toggleSelect(<EDOIndex> xi)

Make the specified EDO selected, unless it is currently selected then merely deselect it.

Parameters:

`xi` - edo index

### undelete

    void undelete(<EDOIndex> xi)

undelete specified editable domain object

Parameters:

`xi` - edo index

### uneditSelected

    void uneditSelected()

unedit selected editable

### unselect

    void unselect()

_unselect() and publish

### update

    void update()

handle update events from the EDOHolder Selection Model

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

Documentation generated by JSDoc on Sun Feb 11 13:28:59 2007