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

9 comments:

Raj 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 ?

Andrej Baranovskij 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

Unknown said...

Hello Andrejus,
Do you know if, in 12c, something additional is required? Because following these steps does not work. And to see the binding, I see that method is empty and it does nothing.
Thanks for your answer.
Best regards

Andrej Baranovskij said...

This sample is based on 12c.

Andrejus

ADF said...

Hi Andrejus,

If i enter 'AC' it is showing related information..that's fine.if it is null it should show all the information in list of values.Could you please help me to do this...

Anonymous said...

Hi,

Is there a way to restrict auto suggest trigger based on number of char entered?
Like I want to trigger auto suggest only for 3 or more char entered.

Andrej Baranovskij said...

Yes, I think there is out of the box property for this.

Andrejus