Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
11g Release 2 (11.1.2.0.0)

E17491-02

<af:autoSuggestBehavior>

autoSuggestBehavior auto suggest behavior


The autoSuggestBehavior tag is a declarative way to show the suggestItems in a dropdown for the editable components based on user input in the field.

suggestItems attribute needs to be bounded to a method with signature List<javax.model.SelectItem> suggestItems(javax.faces.context.FacesContext, oracle.adf.view.rich.model.AutoSuggestUIHints)
The labels of the selectItems will be displayed in the dropdown and when the user selects a particualr item the value will be selected and displayed in the input field.

When smartList is enabled, smartList will be filtered first to show the results. If no items are found in the smart list or user waits without any operation, the entire suggestedItems list will be fetched from the server to show in the dropdown.

When maxSuggestedItems is defined, only those number of suggestItems will be fetched from server and a More... link will be rendered in the autoSuggest popup indicating that there can be more suggest items matching the entered value.
When More... link is clicked, All the suggest items will be fetched from the server.

Note: If EL is used in the EL supported attributes of this tag, this tag will not be stampable.

</section> <section name="Code_Example_s_">


   <af:inputText id="inputText" label="String value"
                   value="#{bean.value}">
      <af:autoSuggestBehavior suggestItems="#{bean.suggestItems}" maxSuggestedItems="5" />
   </af:inputText>
            

Attributes

Name Type Supports EL? Description
maxSuggestedItems int Yes The number of items to be returned from the suggestItems implementation. -1 would fetch all the records.
smartList javax.el.MethodExpression Only EL An EL expression pointing to the java method which returns List<javax.model.SelectItem> of the smart list items.
suggestedItems javax.el.MethodExpression Only EL The attribute is deprecated, use suggestItems instead.
An EL expression pointing to the java method which returns List<javax.model.SelectItem> of the suggestedItems. The method should take one string argument, submitted value
suggestItems javax.el.MethodExpression Only EL An EL expression pointing to the java method which returns List<javax.model.SelectItem> of the suggestedItems. The method signature should be of the form List<javax.model.SelectItem> suggestItems(javax.faces.context.FacesContext, oracle.adf.view.rich.model.AutoSuggestUIHints)