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:

  1. 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 ?

    ReplyDelete
  2. Not sure, I would need to test this.

    Andrejus

    ReplyDelete
  3. 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

    ReplyDelete
  4. 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

    ReplyDelete
  5. 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

    ReplyDelete
  6. 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...

    ReplyDelete
  7. 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.

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

    Andrejus

    ReplyDelete