Mercurial > hg > LGServices
view src/main/webapp/methods/sectionIdAutocomplete.jsp @ 33:5520f941f6cb
new: sorting and filters in homepage for branch list
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 25 Sep 2015 14:32:47 +0200 |
parents | 3e62083dbcbf |
children |
line wrap: on
line source
<%@page import="java.util.List"%> <%@page import="de.mpiwg.gazetteer.utils.DBService"%> <%@page import="org.json.JSONObject"%> <%@page import="org.json.JSONArray"%> <% String term = request.getParameter("term"); List<String> list = DBService.suggestSectionId(term, 10); JSONArray jsonArr = new JSONArray(); for(String item : list){ JSONObject json = new JSONObject(); json.put("name", item); json.put("value", item); jsonArr.put(json); } out.println(jsonArr); %>