Mercurial > hg > LGServices
view src/main/webapp/methods/sectionIdAutocomplete.jsp @ 87:910cfd8521dd
1. Add ?Source? column in Section Page
2. Add pagination in Section Page
| author | Calvin Yeh <cyeh@mpipw-berlin.mpg.com> |
|---|---|
| date | Fri, 19 May 2017 20:12:34 +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); %>
