Interface: IndexerModel

Oracle® JavaScript Extension Toolkit (JET)
5.0.0

E90577-01

QuickNav

Fields

IndexerModel

Version:
  • 5.0.0
Since:
  • 1.2
Module:
  • ojindexer
The interface for oj.IndexerModel which should be implemented by all object instances bound to the data parameter for ojIndexer.
Since:
  • 1.2

Fields

(static) SECTION_OTHERS :Object

Constant for the section that represents all non-letters including numbers and symbols.
Properties:
Name Type Description
id string The id of this section
label string The label of this section

Methods

getIndexableSections() → {Array.<string>|Array.<Object>}

Returns an array of objects each representing a section in the associated ListView. The section object could either be a String or an object containing at least a 'label' field. For example, the implementation may return an array of Strings representing letters of the alphabet. Or it may return an array of objects each containing a 'label' field for the section titles.
Returns:
an array of all indexable sections
Type
Array.<string> | Array.<Object>

getMissingSections() → {Array.<string>|Array.<Object>}

Returns an array of objects each representing a section that does not have a corresponding section in the associated ListView. It must be a subset of the return value of getIndexableSections. Return null or undefined if there's nothing missing.
Returns:
an array of missing sections
Type
Array.<string> | Array.<Object>

setSection(section) → {Promise.<string>|Promise.<Object>}

Make a section current in the Indexer. The implementation should scroll the associated ListView so that the section becomes visible.
Parameters:
Name Type Description
section string | Object the current section
Returns:
a Promise which when resolved will return the section that the associated ListView actually scrolls to. For example, the implementation could choose to scroll to the next available section in ListView if no data exists for that section.
Type
Promise.<string> | Promise.<Object>