BiAbstractAutoCompleteDataModel

The base class of all auto complete data models

This class extends BiEventTarget and therefore all methods and fields available for BiEventTarget are also available for BiAbstractAutoCompleteDataModel .

Constructor

new BiAbstractAutoCompleteDataModel ( )

Parameters

No parameters.

Properties

NameTypegetsetDescripton
itemCountNumbercheckedReturn the current number of items depending on the last execution of "prepareData".

Methods

NameDescription
dispatchDataReadyPrepares and dispatches a "dataready" event.
getItemReturn the item associated with an specific index. Depends on the last execution of "prepareData".
prepareDataPrepares the data to be used to populate the autocomplete drop down.

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.

Method Details

dispatchDataReady

Prepares and dispatches a "dataready" event.

Syntax

object.dispatchDataReady ( oData )

Parameters

NameTypeOptionalDefaultDescripton
oDataArrayThe data that are to be used by autocomplete to populate the drop down.

Return Type

void

getItem

Return the item associated with an specific index. Depends on the last execution of "prepareData".

Syntax

object.getItem ( nIndex )

Parameters

NameTypeOptionalDefaultDescripton
nIndexNumberthe index

Return Type

String

prepareData

Prepares the data to be used to populate the autocomplete drop down.

Syntax

object.prepareData ( sText )

Parameters

NameTypeOptionalDefaultDescripton
sTextStringSearch text entered by the user.

Return Type

void