|
The Gravey 2.0 Framework and AIM RIA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--GrvObject
|
+--MVCObserver
|
+--MVCModel
|
+--MVCListModel
This class encapsulates a data model for a List of objects.
This class implements the MVCCollection interface.
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
Defined in grvMVC.js
| Constructor Summary | |
MVCListModel
()
|
|
| Method Summary | |
Object
|
_del(i)
delete given index from list |
Object
|
_pop( )
pop top item off list but dont publish |
int
|
_push(o)
push item onto list but dont publish |
Object
|
_reset( )
clear list and update timestamp but dont publish |
void
|
addBefore(i,o)
add the given object into the list just before the given zero-based-index |
int
|
addItem(o)
push given item onto list and publish |
MVCListModel
|
clone()
return a (deep) clone of "this" object. |
Object
|
delItem(i)
delete given index from list and publish |
String
|
dump()
debug method to return this list as a string |
int
|
getCount( )
return count of items in list |
Object
|
getItem(i)
return item in list with given index |
String
|
getItemStr(i)
return item in list with given index as formatted string |
Object
|
getMemento()
return a memento of the current state of "this" |
int
|
hash()
provide a "unique" number based on the state of this list NOTE: the quality of this hash code depends on the quality of the hash code provided by each list item. |
void
|
iterate(<Function> f)
iterate thru items in list calling specified function |
void
|
konstructor( <String> optName )
|
Object
|
reset( )
clear list and publish |
void
|
setMemento(<Object> m)
update "this" based on the given memento |
| 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
|
| Constructor Detail |
MVCListModel()
| Method Detail |
Object _del(i)
Object _pop( )
int _push(o)
Object _reset( )
void addBefore(i,o)
int addItem(o)
MVCListModel clone()
Object delItem(i)
String dump()
int getCount( )
Object getItem(i)
String getItemStr(i)
Object getMemento()
int hash()
void iterate(<Function> f)
f - function that takes index and object as params and returns true if the iteration should be stopped before all items in list are processed.
void konstructor( <String> optName )
optName - optional name of this instance
Object reset( )
void setMemento(<Object> m)
m - the memento
|
The Gravey 2.0 Framework and AIM RIA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||