You need to sign in to do that
Don't have an account?
Sorting html-autcomplete in Visualforce
Hi,
I'm using the "list" attribute in apex:InputText tag in Visualforce to feed a list of String for autocomplete (html-autocomplete="on"). I've a requirement to display results in a sorted manner. Modifying/Sorting the underlying List<String> does not seem to have any impact.
Syntax:
Is there any way to do that? Any help will be appreciated..!!
Regards,
Ayan
I'm using the "list" attribute in apex:InputText tag in Visualforce to feed a list of String for autocomplete (html-autocomplete="on"). I've a requirement to display results in a sorted manner. Modifying/Sorting the underlying List<String> does not seem to have any impact.
Syntax:
<apex:inputText id="InputBox" value="{!selectecValue}" list="{!autocomplete}" html-autocomplete="on"/>--- Here autocomplete is of type: List<String>. Even after sorting the list in controller (as per business requirement) the display order in visualforce page remains the same.
Is there any way to do that? Any help will be appreciated..!!
Regards,
Ayan
Please check below blog. I hope that will help you:-
http://www.jitendrazaa.com/blog/salesforce/ajax-based-autocomplete-component-in-salesforce-using-jquery-ui-and-json/
Please mark this as solution if this will help you.
Thanks
Amit Chaudhary