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 BidderModel

    Object
       |
       +--BidderModel

class BidderModel

This class encapsulates the data model of a particular Bidder. This model subscribes to a BidderSelectionModel so that new Contact and Shipping lists can be downloaded whenever a new Bidder is selected.

NOTE: Other parts of AIM assume that the Contact and Shipping lists will never be null; zero items is ok though.

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

- konstructor()

Defined in aimbidders.js

Constructor Summary
`BidderModel ()`

Method Summary
`EDOIndex` | `_appendContact( <int> i, <EDO> edo )` append a new Contact
`EDOIndex` | `_appendShipping( <int> i, <EDO> edo )` append a new Shipping
`Bidder` | `_getBidder( <int> i )` return the specified Bidder
`Contact` | `_getContact( <int> i )` return the specified contact
`Shipping` | `_getShipping( <int> i )` return the specified Shipping
`void` | `_insertContact( <int> i, <EDO> edo )` insert a new Contact
`void` | `_insertShipping( xi )` insert a new Shipping
`EDOIndex` | `_newBidder( <int> i, <EDO> edo )` create a new Bidder
`MVCListModel` | `_newContacts()` get a new Contacts list
`EDO` | `_newEDO(<EDOIndex> xi)` return a new blank EDO of the type implied by EDOIndex
`MVCListModel` | `_newShipping()` get a new Shipping list
`void` | `_resetEDOs( optBidder )` clear EDOs
`void` | `_setBidder(o)` set our Bidder 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(<BSCIndex> xi)` return reference to the specified editable domain object
`String` | `getName()` return the parent Bidder 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` | `inactive()` return the parent Bidder isInactive flag
`boolean` | `isDirty()` return whether any EDOs are changed for this model
`boolean` | `isValid()` return whether all EDOs are valid for this model
`boolean` | `keysMatch(<EDOHolderSelectionItem> item)` return whether current EDO matches selection item "key"
`void` | `konstructor( <BidderSelectionModel> BidderSelectionModel, <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

### BidderModel

    BidderModel()

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

- konstructor()

Method Detail

### _appendContact

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

append a new Contact

Parameters:

`i` - contact list index

`edo` - the contact

Returns:

EDOIndex of new EDO

### _appendShipping

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

append a new Shipping

Parameters:

`i` - Shipping list index

`edo` - the Shipping

Returns:

EDOIndex of new EDO

### _getBidder

    Bidder _getBidder( <int> i )

return the specified Bidder

Parameters:

`i` - index into Bidder list

### _getContact

    Contact _getContact( <int> i )

return the specified contact

Parameters:

`i` - index into contact list

### _getShipping

    Shipping _getShipping( <int> i )

return the specified Shipping

Parameters:

`i` - index into Shipping list

### _insertContact

    void _insertContact( <int> i, <EDO> edo )

insert a new Contact

Parameters:

`i` - contact list index

`edo` - the contact

### _insertShipping

    void _insertShipping( xi )

insert a new Shipping

Parameters:

`i` - Shipping list index

`edo` - the Shipping

### _newBidder

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

create a new Bidder

Parameters:

`i` - Bidder list index

`edo` - the Bidder

Returns:

EDOIndex of new EDO

### _newContacts

    MVCListModel _newContacts()

get a new Contacts list

### _newEDO

    EDO _newEDO(<EDOIndex> xi)

return a new blank EDO of the type implied by EDOIndex

Parameters:

`xi` - edo index

### _newShipping

    MVCListModel _newShipping()

get a new Shipping list

### _resetEDOs

    void _resetEDOs( optBidder )

clear EDOs

### _setBidder

    void _setBidder(o)

set our Bidder 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(<BSCIndex> xi)

return reference to the specified editable domain object

Parameters:

`xi` - edo index

### getName

    String getName()

return the parent Bidder 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

### inactive

    boolean inactive()

return the parent Bidder isInactive flag

### isDirty

    boolean isDirty()

return whether any EDOs are changed for this model

### isValid

    boolean isValid()

return whether all EDOs are valid for this model

### keysMatch

    boolean keysMatch(<EDOHolderSelectionItem> item)

return whether current EDO matches selection item "key"

Parameters:

`item` - selection menu item

### konstructor

    void konstructor( <BidderSelectionModel> BidderSelectionModel, <String> optName )

Parameters:

`BidderSelectionModel` - model of which Bidder 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