Mercurial > hg > LGServices
diff src/main/webapp/pages/topicPage.jsp @ 42:815cd86bb9ec
bug fixed: some NullPointer situations caused by null topicId
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 18 Dec 2015 11:50:24 +0100 |
parents | ba9515f22897 |
children | 9dbbbfd474f4 |
line wrap: on
line diff
--- a/src/main/webapp/pages/topicPage.jsp Thu Dec 17 13:44:08 2015 +0100 +++ b/src/main/webapp/pages/topicPage.jsp Fri Dec 18 11:50:24 2015 +0100 @@ -65,7 +65,7 @@ <label class="subTitel">You must login!</label> <% } else { %> - <% if(sessionBean.getTopicPage().getCompleteSectionList() == null || sessionBean.getParameter("topicId") != null) { + <% if(sessionBean.getTopicPage().getCompleteSectionList() == null || request.getParameter("topicId") != null) { sessionBean.getTopicPage().loadParameters(request, response); sessionBean.getTopicPage().loadTopic(request.getParameter("topicId")); } %> @@ -80,6 +80,8 @@ action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" method="post"> <input name="bean" type="hidden" value="topicBean" /> + <input name="topicId" type="hidden" value="<%=sessionBean.getTopicPage().getTopicId()%>" /> + <table> <% for(VDCUser user : sessionBean.getTopicPage().getSuggestionUserList()) { %> <tr> @@ -118,6 +120,7 @@ action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" method="post"> <input name="bean" type="hidden" value="topicBean" /> + <input name="topicId" type="hidden" value="<%=sessionBean.getTopicPage().getTopicId()%>" /> <input type="text" name="description" size="60" maxlength="250" value="<%=sessionBean.getTopicPage().getTopic().getDescription() %>" /> <input type="image" alt="edit description" onclick="setAction('updateDescription', 'topicForm');" src="<%=sessionBean.getApplicationBean().getSaveImage()%>" width="15" height="15"/> @@ -146,6 +149,8 @@ action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" method="post"> <input name="bean" type="hidden" value="topicBean" /> + <input name="topicId" type="hidden" value="<%=sessionBean.getTopicPage().getTopicId()%>" /> + <table style="width: 300px;" class="pageTable"> <% for(VDCUser contr : sessionBean.getTopicPage().getContributors()) { %> <tr> @@ -179,10 +184,12 @@ action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" method="post"> <input name="bean" type="hidden" value="topicBean" /> + <input name="topicId" type="hidden" value="<%=sessionBean.getTopicPage().getTopicId()%>" /> + <label class="subTitel">Sections in Topic <input type="image" - onclick="setAction('forceLoadTopicSectionRelation', 'topicSectionRelationForm');" + onclick="setAction0('forceLoadTopicSectionRelation', 'topicSectionRelationForm');" src="<%=sessionBean.getApplicationBean().getRefreshImage()%>" width="20" height="20"/> </label> @@ -520,6 +527,7 @@ <% } %> </td> <td> + <input type="image" onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> setAction0('deleteSection', 'topicSectionRelationForm', 'sectionId', <%=section.getId() %>);" src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/>