Using the inputListOfValues Component

Using List-of-Values Components 11-11 The rest of the attributes in this section can be populated in the same manner as any other input component. For more information, see Section 9.3, Using the inputText Component.

4. Expand the Behavior section and set the following attribute values:

■ autoSubmit : Set to true if you want the component to automatically submit the enclosing form when an appropriate action takes place a click, text change, and so on. This will allow the auto complete feature to work. If you are adding the auto-suggest behavior, you must set autoSubmit to true. ■ createPopupId : If you have implemented a popup dialog used to create a new object in the list, specify the ID of that popup component. Doing so will display a toolbar component above the table that contains a commandToolbarButton component bound to the dialog you defined. If you have added a dialog to the popup, then it will intelligently decide when to refresh the table. If you have not added a dialog to the popup, then the table will always be refreshed. ■ launchPopupListener : Enter an EL expression that resolves to a launchPopupListener handler that you implement to provide additional functionality when the popup dialog is opened. ■ returnPopupListener : Enter an EL expression that resolves to a returnPopupListener handler that you implement to provide additional functionality when the value is returned. The rest of the attributes in this section can be populated in the same manner as any other input component. For more information, see Section 9.3, Using the inputText Component. 5. If you are using a launchPopupListener, you can use the getPopupType method of the LaunchPopupEvent class to differentiate the source of the event. getPopupType returns DROPDOWN_LIST if the event is a result of the launch of the LOV Search and Select dialog, and SEARCH_DIALOG if the event is the result of the user clicking the Search button in the dialog. 6. If you want users to be able to create a new item, create a popup dialog with the ID given in Step 5. For more information, see Chapter 13, Using Popup Dialogs, Menus, and Windows.

7. In the Component Palette, from the Operations panel, drag an Auto Suggest

Behavior and drop it as child to the inputComboboxListOfValues component. 8. In the Property Inspector, for each of the auto suggest attributes, enter the: ■ EL expression that resolves to the suggestItems method. The method should return Listjavax.model.SelectItem of the suggestItems. The method signature should be of the form Listjavax.model.SelectItem suggestItemsjavax.faces.context.FacesContext, oracle.adf.view.rich.model.AutoSuggestUIHints ■ EL expression that resolves to the smartList method. The method should return Listjavax.model.SelectItem of the smart list items. ■ number of items to be displayed in the auto suggest list. Enter -1 to display the complete list. If you are implementing this method in a managed bean, the JSF page entry should have the format shown in Example 11–5 . 11-12 Web User Interface Developers Guide for Oracle Application Development Framework Example 11–5 autoSuggestBehavior Tag in an LOV af:inputComboboxListOfValues value={bean.value} id=inputId ... af:autoSuggestBehavior suggestItems={bean.suggestItems} smartList={bean.smartList} maxSuggestedItems=7 af:inputComboboxListOfValues If the component is being used with a data model such as ADF Model, the suggestItem method should be provided by the default implementation. 9. If you are not using the component with ADF Model, create the suggestItems method to process and display the list. The suggestItems method signature is shown in Example 11–6 . Example 11–6 suggestItems Method Signature Listjavax.model.SelectItem suggestItemsjavax.faces.context.FacesContext, oracle.adf.view.rich.model.AutoSuggestUIHints 12 Using Query Components 12-1 12 Using Query Components This chapter describes how to use the query and quickQuery search panel components. This chapter includes the following sections: ■ Section 12.1, Introduction to Query Components ■ Section 12.2, Implementing the Model for Your Query ■ Section 12.3, Using the quickQuery Component ■ Section 12.4, Using the query Component

12.1 Introduction to Query Components

The query and quickQuery components are used to search through data sets. The query component provides a comprehensive set of search criteria and controls, while the quickQuery component can be used for searching on a single criterion. The query component supports the following functionality: ■ Selecting and searching against multiple search criteria ■ Dynamically adding and deleting criteria items ■ Selecting search operators associated to a single criterion ■ Choosing match all or match any conjunction ■ Displaying in a basic, advanced, compact, simple, or design mode ■ Creating saved searches ■ Personalizing saved searches By default, the advanced mode of the query component allows the user to add and delete criteria items to the currently displayed search. However you can implement your own QueryModel class that can hide certain features in basic mode and expose them only in advanced mode. For example, you might display operators only in advanced mode or display more criteria in advanced mode than in basic mode. Typically, the results of the query are displayed in a table or tree table, which is identified using the resultComponentId attribute of the query component. However, you can display the results in any other output components as well. The component configured to display the results is automatically rerendered when a search is performed. Figure 12–1 shows an advanced mode query component with three search criteria.