OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.data.inputSearch
Class AdfChainSuggestionsMap

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.data.inputSearch.AdfSuggestionMapInterface
               |
               +--oracle.adfinternal.view.js.data.inputSearch.AdfSuggestionMap
                     |
                     +--oracle.adfinternal.view.js.data.inputSearch.AdfChainSuggestionsMap

public class AdfChainSuggestionsMap
extends AdfSuggestionMap
Used by InputSearch's peer as the datastructure for the displayedSuggestions. The class combines multiple AdfSuggestionMap instances and provides an abstraction as if the user is working with a single larged merged AdfSuggestionMap instance. In addition this class provides methods to help render and manage the virtual rendering provided by AdfInputSearchScrollManager by providing abstractions to treat the sectional headers as members of the suggestionMap itself. This is a subclass of AdfSuggestionMap.


Field Summary

private Object
_chain
public Object
inclusiveHeaderLength
public Object
length
private Object
_source

Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass

Fields inherited from org.ecmascript.object.Object

prototype

Constructor Summary

public
AdfChainSuggestionsMap()
Used by InputSearch's peer as the datastructure for the displayedSuggestions.

Method Summary

public Object
addSuggestionMap(AdfSuggestionMap suggestionMap, Object section)
Adds a new instance of AdfSuggestionMap and its source info to the chain.
public Object
at(Object chainedIndex)
Resolves the chainedIndex to appropriate index within a chain member and returns the suggestionMap item.
public Object
filter(Object callback, Object thisArg)
Array.filter equivalent method for this chained suggestionMap.
public Object
forEach(Object callback, Object thisArg)
Method to iterate over all the map items as members of a single map.
public Object
get(Object key)
Iterate over all the chained AdfSuggestionMap instances and invoke get on each chained member repeatedly until the map item is found
public Object
getArray()
Invoke with caution as this method creates a new array by combining the map items of all the chained maps.
public Object
getChainedIndex(Object inclusiveIndex)
Returns the chained index, give inclusive header index.
private Object
_getChainNoAndIndex(Object inclusiveIndex)
Resolves the header inclusive index to appropriate chain member and the index within the chain member.
public Object
getInclusiveHeaderIndex(Object chainedIndex)
Gets the header inclusive index from the chainedIndex (i.e.
public Object
getSuggestionMap(Object index)
Returns the AdfSuggestionMap instance at the given index of the chain
public Object
inclusiveHeaderForEach(Object inclusiveHeaderStartIndex, Object inclusiveHeaderEndIndex, Object callback, Object thisArg)
forEach equivalent accounting for headers of searchSection/suggestionSection suggestion map
protected Object
Init()
The class internally manages the total length of the chained suggestionMap, with and without header accounted for.
protected static Object
InitClass()
private Object
_shouldCountSectionHeader(Object index)
A section will render or has a header if the section's suggestionMap is non empty and has a header configured for the section.
public Object
updateSuggestionMap(Object index, Object suggestionMap)
Update the AdfSuggestionMap instance at the given index

Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString

Field Detail


_chain

private Object _chain

inclusiveHeaderLength

public Object inclusiveHeaderLength

length

public Object length

_source

private Object _source

Constructor Detail


AdfChainSuggestionsMap

public AdfChainSuggestionsMap()

Used by InputSearch's peer as the datastructure for the displayedSuggestions. The class combines multiple AdfSuggestionMap instances and provides an abstraction as if the user is working with a single larged merged AdfSuggestionMap instance. In addition this class provides methods to help render and manage the virtual rendering provided by AdfInputSearchScrollManager by providing abstractions to treat the sectional headers as members of the suggestionMap itself. This is a subclass of AdfSuggestionMap.

Method Detail


addSuggestionMap

public Object addSuggestionMap(AdfSuggestionMap suggestionMap,
                               Object section)

Adds a new instance of AdfSuggestionMap and its source info to the chain.

Parameters:
suggestionMap  
section  
Return:
Object

at

public Object at(Object chainedIndex)

Resolves the chainedIndex to appropriate index within a chain member and returns the suggestionMap item.

Parameters:
chainedIndex  
Return:
Object
Overrides:
AdfSuggestionMap.at(Object)

filter

public Object filter(Object callback,
                     Object thisArg)

Array.filter equivalent method for this chained suggestionMap.

Parameters:
callback  
thisArg  
Return:
Object
Overrides:
AdfSuggestionMap.filter(Object, Object)

forEach

public Object forEach(Object callback,
                      Object thisArg)

Method to iterate over all the map items as members of a single map.

Parameters:
callback  
thisArg  
Return:
Object
Overrides:
AdfSuggestionMap.forEach(Object, Object)

get

public Object get(Object key)

Iterate over all the chained AdfSuggestionMap instances and invoke get on each chained member repeatedly until the map item is found

Parameters:
key  
Return:
Object
Overrides:
AdfSuggestionMapInterface.get(Object)

getArray

public Object getArray()

Invoke with caution as this method creates a new array by combining the map items of all the chained maps.

Return:
Object
Overrides:
AdfSuggestionMap.getArray()

getChainedIndex

public Object getChainedIndex(Object inclusiveIndex)

Returns the chained index, give inclusive header index. The inclusiveIndex should mandatorily be the index of the suggest item and not of the header to get meaningful chainedIndex.

Parameters:
inclusiveIndex  
Return:
Object

_getChainNoAndIndex

private Object _getChainNoAndIndex(Object inclusiveIndex)

Resolves the header inclusive index to appropriate chain member and the index within the chain member. Also provides the aggregated index in the chained collection.

Parameters:
inclusiveIndex  
Return:
Object

getInclusiveHeaderIndex

public Object getInclusiveHeaderIndex(Object chainedIndex)

Gets the header inclusive index from the chainedIndex (i.e. the index without header)

Parameters:
chainedIndex  
Return:
Object

getSuggestionMap

public Object getSuggestionMap(Object index)

Returns the AdfSuggestionMap instance at the given index of the chain

Parameters:
index  
Return:
Object

inclusiveHeaderForEach

public Object inclusiveHeaderForEach(Object inclusiveHeaderStartIndex,
                                     Object inclusiveHeaderEndIndex,
                                     Object callback,
                                     Object thisArg)

forEach equivalent accounting for headers of searchSection/suggestionSection suggestion map

Parameters:
inclusiveHeaderStartIndex  
inclusiveHeaderEndIndex  
callback  
thisArg  
Return:
Object

Init

protected Object Init()

The class internally manages the total length of the chained suggestionMap, with and without header accounted for. The section instances are stored to account for sectional headers and also to help render the sectional headers.

Return:
Object
Overrides:
AdfObject.Init()

InitClass

protected static Object InitClass()

Return:
Object

_shouldCountSectionHeader

private Object _shouldCountSectionHeader(Object index)

A section will render or has a header if the section's suggestionMap is non empty and has a header configured for the section.

Parameters:
index  
Return:
Object

updateSuggestionMap

public Object updateSuggestionMap(Object index,
                                  Object suggestionMap)

Update the AdfSuggestionMap instance at the given index

Parameters:
index  
suggestionMap  
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.