Advertisement
Guest User

multiselect

a guest
Nov 8th, 2013
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. <div id="mainTableDiv">
  2. <select name="input.submittedValues" id="valuesList" multiple="multiple">
  3. <%
  4. try {
  5. List<Object[]> list = null;
  6. List<Object[]> list1 = null;
  7. List<Object[]> list2 = null;
  8. testID = request.getParameter("testId") == null ? "" : request.getParameter("testId");
  9. subjectName = request.getParameter("subNM");
  10. System.out.println("testId in TestParticipant.jsp page is==" + testID + "subjectName=" + subjectName);
  11. // if ("searchParticipant".equals(request.getParameter("goForSearch"))) {
  12. //System.out.println("insode the if (searchParticipant(search)" + request.getParameter("search"));
  13. String serItem = request.getParameter("goForSearch") == null ? "" : request.getParameter("goForSearch");
  14. System.out.println("inside the if (searchParticipant(search)" + serItem);
  15. if (testID != "" && serItem == "") {
  16. list = details.getParticipantDetails(testID);
  17. list1 = list;
  18. System.out.println("list in singleparameter method=inside testID != && serItem ====" + list.size());
  19. } else {
  20. String serName = request.getParameter("search") == null ? "" : request.getParameter("search");
  21. list = details.getParticipantDetails(serName, testID);
  22.  
  23. }
  24. //list = details.getParticipantDetails(serItem, testID);
  25. System.out.println("list in singleparameter method=before if block==" + list.size());
  26. int sl = 1;
  27. if (!list.isEmpty()) {
  28.  
  29. for (Object[] obj : list) {
  30. //System.out.println("hello block"+ obj[0].toString());
  31. String id = obj[0].toString();
  32. String nickName = obj[1].toString();
  33. String email = obj[2].toString();
  34. String userId = obj[3].toString();
  35. participantName = nickName + " ( " + email + " )";
  36.  
  37. %>
  38. <option value="<%=sl%>" selected=""><%=participantName%></option>
  39. <input type="hidden" name="hdnSeekerPartyId<%=sl%>" id="hdnSeekerPartyId<%=sl%>" value="<%=id%>"/>
  40. <input type="hidden" name="hdnSeekerUserId<%=sl%>" id="hdnSeekerUserId<%=sl%>" value="<%=userId%>"/>
  41. <input type="hidden" name="hdnParticipantName<%=sl%>" id="hdnParticipantName<%=sl%>" value="<%=participantName%>"/>
  42. <% sl++;
  43. }
  44. //}
  45. }
  46. } catch (Exception e) {
  47. //System.out.println("inside the catch of try ...." + e.getMessage());
  48. //e.printStackTrace();
  49. }
  50. %>
  51. </select>
  52. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement