Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.6.0)
E10684-07


oracle.adf.view.rich.model
Class ListOfValuesModel

java.lang.Object
  extended by oracle.adf.view.rich.model.ListOfValuesModel


public abstract class ListOfValuesModel
extends java.lang.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).


Constructor Summary
ListOfValuesModel()
           

 

Method Summary
abstract  java.util.List<java.lang.Object> autoCompleteValue(java.lang.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.
 java.util.List<ColumnDescriptor> getItemDescriptors()
          Return a list of columns that should be displayed in the drop down.
abstract  java.util.List<? extends java.lang.Object> getItems()
          Returns a list of items used within the searchable list in an inputComboxListOfValues.
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  java.util.List<? extends java.lang.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.
 java.lang.Object getValueFromSelection(java.lang.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&lt Object&gt 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.
abstract  void valueSelected(java.lang.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 java.util.List<? extends java.lang.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 java.util.List<? extends java.lang.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 java.util.List<java.lang.Object> autoCompleteValue(java.lang.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(java.lang.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&lt Object&gt 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 java.lang.Object getValueFromSelection(java.lang.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&lt Object&gt 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 -
Returns:
Object

getItemDescriptors

public java.util.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.

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.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.6.0)
E10684-07


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