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

## Class ItemModel

    Object
       |
       +--ItemModel

class ItemModel

This class encapsulates the data model of a particular Item. This model subscribes to a ItemSelectionModel so that it can be downloaded whenever a new Item is selected.
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Defined in aimitems.js

Constructor Summary
`ItemModel ()`

Method Summary
`Item` | `_getItem( <int> i )` return the specified item
`Loan` | `_getLoan( <int> i )` return the specified loan
`EDO` | `_newEDO(<EDOIndex> xi)` return a new blank EDO of the type implied by EDOIndex
`EDOIndex` | `_newItem( <int> i, itemEDO )` create a new item
`EDOIndex` | `_newLoan( <int> i, <EDO> edo )` create a new loan
`void` | `_resetEDOs( optItem, optLoan )` clear EDOs
`void` | `_setItem(o)` set our Plain object but dont publish
`void` | `_setLoan(o)` set our Loan object but dont publish
`EDOIndex` | `appendEDO(<EDOIndex> xi)` create new EDO which is appended at end of EDO list
`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
`String` | `dump()` return the debug details of "this"
`Object` | `getEDO(<PLIndex> xi)` return reference to the specified editable domain object
`String` | `getLotNo()` return the parent item lot number for this model
`String` | `getName()` return the parent item name for this model
`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
`Object` | `isLoan()`
`boolean` | `isValid()` return whether all EDOs are valid for this model
`int` | `itemCount( itemnum, key )` return how many item have the given item number in its lot
`boolean` | `keysMatch(<EDOHolderSelectionItem> item)` return whether current EDO matches selection item "key"
`void` | `konstructor( <ItemSelectionModel> itemSelectionModel, <String> optName )`
`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` | `toggleExpand( <boolean> doAllFlag, <EDOIndex> xi )` toggle the "expanded" flag of the specified EDOs.

Constructor Detail

### ItemModel

    ItemModel()

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

- konstructor()

Method Detail

### _getItem

    Item _getItem( <int> i )

return the specified item

Parameters:

`i` - index into item list

### _getLoan

    Loan _getLoan( <int> i )

return the specified loan

Parameters:

`i` - index into loan list

### _newEDO

    EDO _newEDO(<EDOIndex> xi)

return a new blank EDO of the type implied by EDOIndex

Parameters:

`xi` - edo index

### _newItem

    EDOIndex _newItem( <int> i, itemEDO )

create a new item

Parameters:

`i` - item list index

`edo` - the item

Returns:

EDOIndex of new EDO

### _newLoan

    EDOIndex _newLoan( <int> i, <EDO> edo )

create a new loan

Parameters:

`i` - loan list index

`edo` - the loan

Returns:

EDOIndex of new EDO

### _resetEDOs

    void _resetEDOs( optItem, optLoan )

clear EDOs

### _setItem

    void _setItem(o)

set our Plain object but dont publish

### _setLoan

    void _setLoan(o)

set our Loan object but dont publish

### appendEDO

    EDOIndex appendEDO(<EDOIndex> xi)

create new EDO which is appended at end of EDO list

Parameters:

`xi` - edo index

Returns:

EDOIndex of new EDO

### createEDO

    EDOIndex createEDO(<EDOIndex> xi)

create new EDO which is inserted after selected EDO

Parameters:

`xi` - edo index

Returns:

EDOIndex of new EDO

### createSelectionItem

    EDOHolderSelectionItem createSelectionItem()

create a new item for the selection list from current EDO

### dump

    String dump()

return the debug details of "this"

### getEDO

    Object getEDO(<PLIndex> xi)

return reference to the specified editable domain object

Parameters:

`xi` - edo index

### getLotNo

    String getLotNo()

return the parent item lot number for this model

### getName

    String getName()

return the parent item name for this model

### getUpdatedProperty

    Object getUpdatedProperty()

return the updated properties from the current EDO needed for select list update

Returns:

arbitrary value as needed

### hasEDO

    boolean hasEDO()

return whether there is currently an EDO

### isDirty

    boolean isDirty()

return whether any EDOs are changed for this model

### isLoan

    Object isLoan()

### isValid

    boolean isValid()

return whether all EDOs are valid for this model

### itemCount

    int itemCount( itemnum, key )

return how many item have the given item number in its lot

### keysMatch

    boolean keysMatch(<EDOHolderSelectionItem> item)

return whether current EDO matches selection item "key"

Parameters:

`item` - selection menu item

### konstructor

    void konstructor( <ItemSelectionModel> itemSelectionModel, <String> optName )

Parameters:

`itemSelectionModel` - model of which Item is selected

`optName` - optional name of this instance

### propMatch

    boolean propMatch(<EDOHolderSelectionItem> item)

return whether current EDO matches selection item "properties"

Parameters:

`item` - selection menu item

### pushPosts

    void pushPosts( <Array> posts )

push into given array all AJAX SAVE Post params for this model

Parameters:

`posts` - string array containing POST params

### toggleExpand

    void toggleExpand( <boolean> doAllFlag, <EDOIndex> xi )

toggle the "expanded" flag of the specified EDOs.

Parameters:

`doAllFlag` - if true, set all of the EDOs to new value

`xi` - edo index

Overview | File | Class | Tree | Index | Help
| The Gravey 2.0 Framework and AIM 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:42 2007