oracle.adf.view.rich.model

## Class ListOfValuesModel

- java.lang.Object
- - oracle.adf.view.rich.model.ListOfValuesModel

-     public abstract class ListOfValuesModel
      extends Object

  This abstract class defines a contract that is required to be met by any managed bean that provides data relevant to displaying an LOV component. In addition this interface defines methods to retrieve a QueryModel and TableModel, in order to to display a table and/or a query component (which are used to search and select an appropriate value for the LOV component).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ListOfValuesModel.ListType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ListOfValuesModel()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract List<Object>` | `autoCompleteValue(Object value)` Called by the framework during Apply Request values phase. This method is called only when autoSubmit is set to true on the component and user either presses enter key or tab key on the input field.
    `AutoSuggestBehaviorConfig` | `getAutoSuggestBehaviorConfig()` This returns the AutoSuggestBehaviorConfig object.
    `List<ColumnDescriptor>` | `getItemDescriptors()` Return a list of columns that should be displayed in the drop down.
    `abstract List<? extends Object>` | `getItems()` Returns a list of items used within the searchable list in an inputComboxListOfValues.
    `ListOfValuesModel.ListType` | `getListType()` Returns the type of list configured for the LOV component.
    `abstract QueryDescriptor` | `getQueryDescriptor()` Gets a QueryDescriptor required to render the criteria part of a query component.
    `abstract QueryModel` | `getQueryModel()` Returns a QueryModel required by a query component.
    `abstract List<? extends Object>` | `getRecentItems()` Returns a list of recently selected items (or MRU items) used within the searchable list in an inputComboxListOfValues
    `abstract TableModel` | `getTableModel()` Returns a TableModel object that is in turn used to retrieve a CollectionModel which supplies a list of values to select from.
    `Object` | `getValueFromSelection(Object selectedRow)` This method is called during the Apply Request Values phase, to get the value associated with the selectedRow in the list of values. Returns the value (for the LOV component) given the selectedRow, where the selectedRow is either - a List< Object> of size 1, where Object belongs to list returned by the call to getItems() (or getRecentItems()) or, - a RowKeySet, containing the rowKeys of the selected rows belonging to the getTableModel().getCollectionModel().
    `abstract boolean` | `isAutoCompleteEnabled()` Whether the autoComplete feature is enabled for the LOV component.
    `abstract void` | `performQuery(QueryDescriptor qd)` Called when a query is to be performed on a QueryDescriptor.
    `void` | `searchCancelled()` This method is called by the framework after the search window is cancelled and the control is returned to the form.
    `void` | `setCriterionValue(Object value)` Sets the value of the criterion that matches the LOV's display attribute in the advanced search panel.
    `abstract void` | `valueSelected(Object value)` This method is called by the framework at the end of the Invoke Application phase, to set parameter 'value' as the selected value in the list.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ListOfValuesModel

          public ListOfValuesModel()

  - ### Method Detail

    - #### getQueryDescriptor

          public abstract QueryDescriptor getQueryDescriptor()

      Gets a QueryDescriptor required to render the criteria part of a query component. A null value indicates that a query component is not used for searching a value among a list of values.
      Returns:
        a QueryDescriptor instance. Usually the selected QueryDescriptor

    - #### getQueryModel

          public abstract QueryModel getQueryModel()

      Returns a QueryModel required by a query component. A null value indicates that a query component is not required for searching a value among a list of values.
      Returns:
        a QueryModel instance.

    - #### getTableModel

          public abstract TableModel getTableModel()

      Returns a TableModel object that is in turn used to retrieve a CollectionModel which supplies a list of values to select from. A TableModel object should always be provided.
      Returns:
        a TableModel.

    - #### getItems

          public abstract List<? extends Object> getItems()

      Returns a list of items used within the searchable list in an inputComboxListOfValues. This does not include the recentItems.
      Returns:
        a List of Object instances
      See Also:
        `getRecentItems()`

    - #### getRecentItems

          public abstract List<? extends Object> getRecentItems()

      Returns a list of recently selected items (or MRU items) used within the searchable list in an inputComboxListOfValues
      Returns:
        a List of Object instances

    - #### isAutoCompleteEnabled

          public abstract boolean isAutoCompleteEnabled()

      Whether the autoComplete feature is enabled for the LOV component.
      Returns:
        a boolean true/false

    - #### performQuery

          public abstract void performQuery(QueryDescriptor qd)

      Called when a query is to be performed on a QueryDescriptor. This method will be called when the user enters his search criteria and hits a button to perform the search, in order to select a value for the LOV field.
      Parameters:
        `qd` - the QueryDescriptor for which the query is to be performed.

    - #### autoCompleteValue

          public abstract List<Object> autoCompleteValue(Object value)

      Called by the framework during Apply Request values phase.
      This method is called only when autoSubmit is set to true on the component and user either presses enter key or tab key on the input field. The method determines the number of matches the parameter 'value' has in the list of values .
      Returns null, if no match was found, otherwise returns a List of rows that match the value. In the case of an exact match, the List contains a single entry.The type of object returned is left to the discretion of the model implementor, but it should be noted that in the case of a single match, the value obtained from list.get(0) is passed to the getValueFromSelection() and valueSelected() methods.
      Parameters:
        `value` - the user entered value in the input field
      Returns:
        a List of Object instances

    - #### valueSelected

          public abstract void valueSelected(Object value)

      This method is called by the framework at the end of the Invoke Application phase, to set parameter 'value' as the selected value in the list. This method sets up the model such that results/related fields could show the relevant data. Also, this method results in value to be added to the most-recently-used or favorites list.
      Parameters:
        `value` - the value can be - a List< Object> of size 1, where Object belongs to list returned by the call to getItems() (or getRecentItems()) or,
        - a RowKeySet, containing the rowKeys of the selected rows belonging to the getTableModel().getCollectionModel().
        - or Object, which happens to be the single matched row, returned by call to autoCompleteValue()

    - #### getValueFromSelection

          public Object getValueFromSelection(Object selectedRow)

      This method is called during the Apply Request Values phase, to get the value associated with the selectedRow in the list of values.
      Returns the value (for the LOV component) given the selectedRow, where the selectedRow is either
      - a List< Object> of size 1, where Object belongs to list returned by the call to getItems() (or getRecentItems()) or,
      - a RowKeySet, containing the rowKeys of the selected rows belonging to the getTableModel().getCollectionModel().
      - or Object, which happens to be the single matched row, returned by call to autoCompleteValue()

      This method simply returns the value without pushing the selected value into the model. To indicate that a row has been selected, the method valueSelected() will be called.
      NOTE: Only single selections are supported at this point.

      Parameters:
        `selectedRow` - the selected row.
      Returns:
        Object

    - #### getItemDescriptors

          public List<ColumnDescriptor> getItemDescriptors()

      Return a list of columns that should be displayed in the drop down. This column list may be independent or a subset of the columns displayed in the Table when the search dialog is launched. The List returned by getItems() and getRecentItems() should correspond to the ColumnDescriptors returned by this method.
      Returns:
        list of column descriptors.

    - #### searchCancelled

          public void searchCancelled()

      This method is called by the framework after the search window is cancelled and the control is returned to the form.

    - #### setCriterionValue

          public void setCriterionValue(Object value)

      Sets the value of the criterion that matches the LOV's display attribute in the advanced search panel. The default implementation does nothing.
      Parameters:
        `value` - The submittedValue of the component.

    - #### getAutoSuggestBehaviorConfig

          public AutoSuggestBehaviorConfig getAutoSuggestBehaviorConfig()

      This returns the AutoSuggestBehaviorConfig object. The default implementation returns null.
      Returns:
        the AutoSuggestBehaviorConfig object

    - #### getListType

          public ListOfValuesModel.ListType getListType()

      Returns the type of list configured for the LOV component.
      Returns:
        an enum based on the type of list

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