Thursday, November 10, 2016

ADF LOV Auto Suggest Functionality

ADF Faces LOV component can be easily enabled with auto suggest functionality. This is really powerful feature and should save time for user to search for required list values.

Auto suggest can be configured to be invoked only when certain number of characters is entered. I have configured Job ID list to trigger auto suggest, when two or more characters are entered. No auto suggest with single character:


Two or more characters entered - auto suggest displays filtered LOV values. What is nice about it - it automatically shows all these attributes included into LOV list:


In the background ADF BC executes SQL with bind variable from auto suggest:


LOV is defined on attribute in standard way, nothing special here:


To enable auto suggest behaviour, enough to drag and drop ADF af:autoSuggestBehavior tag into ADF Faces LOV component. Point suggestItems property to LOV binding suggestItems expression. Number of characters when to start auto suggest search is configure through minChars property:


Download sample application - ADFLovAutoSuggestApp.zip

4 comments:

Rajdeep Chaudhary said...

Hi Andrejus,

How to make auto suggest work on Id and Description both...I know how can we do it programmatically ..but can we do it decoratively ?

Andrejus Baranovskis said...

Not sure, I would need to test this.

Andrejus

Karnakar said...

Excellent post again!!! Briningout hidden gems of 12c.
But still wondering auto suggest in query component is not yet available...believe we need to wait for higher versions of ADF

Anonymous said...

Hi Andrejus,

If input LOV is a column in table, then I am not getting suggestItems from bindings corresponds to particular row.
Th code will be like this for inputLOV inside table:









Could you please help, how to get the suggested list of items inside table.?

Thanks in advance,
Manoj