I am developing a java web program that can manage distant ldap entries,
we have to select person and i want to do this with auto-complete text-area functionality
I have Java function to return the entire list, to find by name or just by the begin of the name (wildcard search, spring ldap).
My idea was to use the jQuery ui autocomplete plugin, but I don’t know how to catch remote source.
I think that must be by json object return by a servlet
Anyone know how can I do that?
I hope that’s not to hard to implement
thank in advance for help
So I assume you are successfully getting the data retrieved from the LDAP using spring security.
All you need to do is to convert the data into JSON. If you are not using any json library already, you can use json.org for simplicity (or any other jsob-library).
Create a servlet that accepts request param
term. call your LDAP Search based on this term. Create a json array of the result and print that that onresponsein doGet(). Map the servlet to desired path