|
The Gravey 2.5 Framework and AIM RIA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--GrvObject
|
+--MVCObserver
|
+--MVCModel
|
+--EDOHolderModel
This abstract class encapsulates the functionality of
a data model managing a set of editable domain objects (EDOs).
Second, this model implements the MVCBoolModel.isTrue()
interface where the value reflects whether this model is "dirty".
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:
| Constructor Summary | |
EDOHolderModel
()
|
|
| Method Summary | |
EDO
|
_newEDO(<EDOIndex> xi)
return a new blank EDO of the type implied by EDOIndex |
void
|
_reset()
clear EDOs and update timestamp but dont publish |
void
|
_resetEDOs()
clear EDOs ABSTRACT: sub classes of EDOHolderModel should override this |
EDOIndex
|
appendEDO(<EDOIndex> xi)
create new EDO which is appended at end of EDO list |
String
|
canCreateEDO(<EDOIndex> xi,<boolean> appendFlag)
Is it legal to create a new EDO? |
String
|
canDeleteEDO(<EDOIndex> xi)
Is it legal to delete selected EDO? |
String
|
canEditEDO(<EDOIndex> xi)
Is it legal to edit selected EDO? |
boolean
|
canToggleExpand( <boolean> doAllFlag, <EDOIndex> xi )
can we toggle the "expanded" flag of the specified EDO? |
boolean
|
canUncreateEDO(<EDOIndex> xi,<boolean> appendFlag)
If created, can we undo creation? |
EDOIndex
|
createEDO(<EDOIndex> xi)
create new EDO which is inserted after selected EDO |
EDOHolderSelectionItem
|
createSelectionItem()
create a new item for the selection list from current EDO |
void
|
deleteEDO(<EDOIndex> xi)
delete the specified EDO |
void
|
editEDO(<EDOIndex> xi)
enable editing on the specified EDO |
String
|
getCRUDtype()
return the type of CRUD event that caused EDOHolder reload. |
void
|
getEDO(<EDOIndex> xi)
return reference to the specified editable domain object |
Object
|
getUpdatedProperty()
return the updated properties from the current EDO needed for select list update |
boolean
|
hasEDO()
return whether there is currently an EDO |
boolean
|
isDirty()
return whether any EDOs are changed for this model |
boolean
|
isExpandedEDO(<EDOIndex> xi)
return whether the specified EDO is collapsed or open |
boolean
|
isTrue()
MVCBoolModel API: return "I am modified" flag |
boolean
|
isValid()
return whether all EDOs are valid for this model |
void
|
justCreated()
handle CRUD event: "just created EDOHolder" |
void
|
justDeleted()
handle CRUD event: "just deleted EDOHolder" |
void
|
justRead()
handle CRUD event: "just loaded EDOHolder" |
void
|
justUpdated()
handle CRUD event: "just updated EDOHolder" |
boolean
|
keysMatch(<EDOHolderSelectionItem> item)
return whether current EDO matches selection item "key" |
void
|
konstructor( <MVCSelectionModel> holderSelectionModel, <Object> loadXslDOM, <String> entityName )
|
EDO
|
newEDO(<EDOIndex> xi)
return a new blank EDO of the type implied by EDOIndex |
EDO
|
openEDO(<EDOIndex> xi)
return the specified EDO with the intent to change its attributes |
boolean
|
propMatch(<EDOHolderSelectionItem> item)
return whether current EDO matches selection item "properties" |
void
|
pushPosts( <Array> posts )
push into given array all AJAX SAVE Post params for this model |
void
|
reloaded()
handle "EDOHolder reloaded" event. |
void
|
requestLoad( <Object> edoHolderSelected )
Make a Load-Data request to the AJAX server. |
void
|
requestSave( <Object> edoHolderSelected, <String> updates )
Make a Save-Data request to the AJAX server. |
void
|
reset()
clear list and publish |
void
|
save()
save all of the edits into the database via service layer |
void
|
toggleExpand( <boolean> doAllFlag, <EDOIndex> xi )
toggle the "expanded" flag of the specified EDO. |
void
|
undeleteEDO(<EDOIndex> xi)
undelete the specified EDO |
void
|
uneditEDO(<EDOIndex> xi)
rollback edit on the specified EDO |
void
|
update()
handle update events from the EDOHolder Selection Model |
<static> Object
|
AjaxRequest( <String> theType, <String> theKey, <Function> replyHandler, <String> optPostData, <boolean> optWaitFlag )
Make a REST-style AJAX request to the server. |
| 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
|
| Constructor Detail |
EDOHolderModel()
| Method Detail |
EDO _newEDO(<EDOIndex> xi)
xi - edo index ABSTRACT: sub classes of EDOHolderModel should override this
void _reset()
void _resetEDOs()
ABSTRACT: sub classes of EDOHolderModel should override this
EDOIndex appendEDO(<EDOIndex> xi)
xi - edo index ABSTRACT: sub classes of EDOHolderModel should override this
String canCreateEDO(<EDOIndex> xi,<boolean> appendFlag)
xi - edo index
appendFlag - if true then append else insert
String canDeleteEDO(<EDOIndex> xi)
xi - edo index
String canEditEDO(<EDOIndex> xi)
xi - edo index
boolean canToggleExpand( <boolean> doAllFlag, <EDOIndex> xi )
doAllFlag - if true, set all of the EDOs to new value
xi - edo index
boolean canUncreateEDO(<EDOIndex> xi,<boolean> appendFlag)
xi - edo index
appendFlag - if true then append else insert
EDOIndex createEDO(<EDOIndex> xi)
xi - edo index ABSTRACT: sub classes of EDOHolderModel should override this
EDOHolderSelectionItemABSTRACT: sub classes of EDOHolderModel should override this
createSelectionItem()
void deleteEDO(<EDOIndex> xi)
xi - edo index
void editEDO(<EDOIndex> xi)
xi - edo index
String getCRUDtype()
void getEDO(<EDOIndex> xi)
xi - edo index ABSTRACT: sub classes of EDOHolderModel should override this
ObjectABSTRACT: sub classes of EDOHolderModel should override this
getUpdatedProperty()
booleanABSTRACT: sub classes of EDOHolderModel should override this
hasEDO()
booleanABSTRACT: sub classes of EDOHolderModel should override this
isDirty()
boolean isExpandedEDO(<EDOIndex> xi)
xi - edo index
boolean isTrue()
booleanABSTRACT: sub classes of EDOHolderModel should override this
isValid()
void justCreated()
void justDeleted()
void justRead()
void justUpdated()
boolean keysMatch(<EDOHolderSelectionItem> item)
item - selection menu item ABSTRACT: sub classes of EDOHolderModel should override this
void konstructor( <MVCSelectionModel> holderSelectionModel, <Object> loadXslDOM, <String> entityName )
holderSelectionModel - model of which edoHolderModel is selected
loadXslDOM - XSL DOM that transforms newly loaded XML data into "this"
entityName - entity name of this instance
EDO newEDO(<EDOIndex> xi)
xi - edo index
EDO openEDO(<EDOIndex> xi)
xi - edo index
boolean propMatch(<EDOHolderSelectionItem> item)
item - selection menu item ABSTRACT: sub classes of EDOHolderModel should override this
void pushPosts( <Array> posts )
posts - string array containing POST params ABSTRACT: sub classes of EDOHolderModel should override this
void reloaded()
void requestLoad( <Object> edoHolderSelected )
edoHolderSelected - selected item in observed model
void requestSave( <Object> edoHolderSelected, <String> updates )
edoHolderSelected - selected item in observed model
updates - string of EDO update POSTs
void reset()
void save()
void toggleExpand( <boolean> doAllFlag, <EDOIndex> xi )
doAllFlag - if true, set all of the EDOs to new value
xi - edo index
void undeleteEDO(<EDOIndex> xi)
xi - edo index
void uneditEDO(<EDOIndex> xi)
xi - edo index
void update()
<static> Object AjaxRequest( <String> theType, <String> theKey, <Function> replyHandler, <String> optPostData, <boolean> optWaitFlag )
theType - requested entity name
theKey - unique key of requested entity
replyHandler - reply event handler static function
optPostData - optional string to pass as POST data
optWaitFlag - optional flag that if true says call synchronously (i.e. wait for reply)
|
The Gravey 2.5 Framework and AIM RIA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||