The Gravey 2.5 Framework

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:

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, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
   
Methods inherited from class MVCObserver
subscribe
   
Methods inherited from class GrvObject
souper, souper_, isInstanceOf
 

Constructor Detail

EDOSelectedModel

EDOSelectedModel()

Method Detail

_select

void _select( <EDOIndex> edoIndex )

_unselect

void _unselect()

appendSelected

void appendSelected( <EDOIndex> xi )

canCreateSelected

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

canDeleteSelected

String canDeleteSelected()

canEdit

String canEdit(<EDOIndex> xi)

canEditSelected

String canEditSelected()

canUncreateSelected

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

deleteSelected

void deleteSelected()

editSelected

void editSelected()

forceFlag

void forceFlag(f)

getEDO

EDO getEDO(<EDOIndex> optXI)

getIndex

EDOIndex getIndex()

getSelected

EDO getSelected()

hasSelection

boolean hasSelection()

inEdit

boolean inEdit(<EDOIndex> optXI)

isSelected

boolean isSelected( <EDOIndex> edoIndex )

konstructor

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

newAfterSelected

void newAfterSelected()

select

void select(<EDOIndex> xi)

toggleSelect

void toggleSelect(<EDOIndex> xi)

undelete

void undelete(<EDOIndex> xi)

uneditSelected

void uneditSelected()

unselect

void unselect()

update

void update()

The Gravey 2.5 Framework

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