annotate src/main/webapp/methods/addSectionToTopic.jsp @ 41:ba9515f22897

new: topic management and adding sections from searching result into topic
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 17 Dec 2015 13:44:08 +0100
parents
children 9dbbbfd474f4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1 <%@page import="de.mpiwg.gazetteer.bo.LGTopic"%>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
2 <%@page import="de.mpiwg.gazetteer.db.DBSection"%>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
3 <%@page import="de.mpiwg.gazetteer.utils.DBService"%>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
4 <%@page import="de.mpiwg.gazetteer.utils.DataProvider"%>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
5
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
6 <jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" />
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
7
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
8 <%
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
9 if(request.getParameter("sectionId") != null){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
10 Long sectionId = Long.parseLong(request.getParameter("sectionId"));
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
11
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
12 if(sectionId != 0){
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
13
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
14 if (sessionBean.getTopicListPage().getCompleteTopicList() == null) {
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
15 sessionBean.getTopicListPage().loadParameters(request, response);
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
16 sessionBean.getTopicListPage().reloadTopics();
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
17 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
18
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
19
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
20 %>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
21
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
22 <form name="addSectionToTopicForm" id="addSectionToTopicForm"
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
23 action="<%= sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp"
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
24 method="post">
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
25 <input name="bean" type="hidden" value="topicBean" />
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
26
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
27 <!-- TODO add section to selected topic -->
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
28 <input name="selectedSectionId" type="hidden" value="<%=request.getParameter("sectionId") %>" />
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
29
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
30 <table class="dialogTable">
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
31 <tr>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
32 <td><label style="font-weight: bold;">Topic Id</label></td>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
33 <td><label style="font-weight: bold;">Name</label></td>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
34 </tr>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
35
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
36 <% for (LGTopic topic : sessionBean.getTopicListPage().getCompleteTopicList() ) {%>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
37 <tr>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
38 <td><%=topic.getId() %></td>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
39 <td>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
40 <%=topic.getNameEn() %>(<%=topic.getNameCh() %>)
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
41
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
42 <input type="image"
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
43 onclick="setAction0('addSectionToTopic', 'addSectionToTopicForm', 'selectedTopicId', '<%=topic.getId() %>');"
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
44 src="<%=sessionBean.getApplicationBean().getPlusImage() %>" width="20" height="20"/>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
45 </td>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
46 </tr>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
47 <% } %>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
48 </table>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
49
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
50 </form>
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
51
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
52 <%
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
53 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
54 }
ba9515f22897 new: topic management and adding sections from searching result into topic
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
55 %>