Skip navigation.

Andrejus Baranovski

Syndicate content
Blog about Oracle technology
Updated: 14 hours 57 min ago

Smart Combo Box LOV with Filter

Mon, 2015-08-17 17:47
Combo box LOV with filtering is simple, but effective feature not used often. You should rethink LOV design and apply combo box LOV with filtering where possible. Advantage of such LOV implementation is pretty clear - fast list items access, based on filter criteria. This will reduce number of times required to open LOV popup and improve performance of UI.

LOV VO should implement View Criteria, returning top items to be included into choice list. My example retrieves all jobs with minimum salary greater or equal than 10000. Users will see list items based on this criteria first:

I would recommend to use List UI Hints section of the LOV VO to define LOV UI definition. This will save time when assigning LOV for the attributes, do it once and reuse. I have specified Combo box LOV with filtering based on View Criteria - to include jobs with minimum salary greater than 10000 into initial choice list:

Time is saved when assigning LOV for the attribute - UI Hints are automatically set, based on LOV UI Hints definition:

This is how it looks on UI. Top records are displayed in the choice list, based on applied filter criteria.  All list items can be accessed through More... option:

This is how LOV popup looks by default in ADF 12c. Height is stretched automatically to occupy all possible display height, width is not stretched. Such layout is not good, users don't like it:

LOV popup can be made stretchable with little help of ADF UI CSS. We should use -tr-stretch-search-dialog CSS property to enable LOV popup stretching in ADF 12c (CSS sample is provided with example):

Another important thing to remember about LOV's in ADF 12c - List Range Size property. By default it is being set to -1. This is OK for simple choice lists, where you would like to show all data at once. But not suitable for LOV or combo with LOV, where we don't want to fetch all LOV items at first load:

I would set it to 10, this will populate only visible set of LOV records:

Take a look, how LOV popup window will look after improvements applied - it is stretchable by the user and only initial set of list item records is fetched:

Make sure to use combo LOV with initial filter criteria, to optimise LOV behaviour. Download sample application -