Loading...
Helix SwarmHelix Swarm
Loading...

labels.jsp

  • //
  • guest/
  • david_markley/
  • p4jsp/
  • web/
  • labels.jsp #5
  • View
  • Commits
  • Open Download .zip Download (2 KB)
  1. <?xml version="1.0"?>
  2. <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
  3. <jsp:directive.page import="java.util.*,com.perforce.api.*" contentType="text/html;charset=ISO-8859-1"/>
  4. <jsp:directive.include file="session.jsp"/>
  5. <jsp:scriptlet>title="P4JSP Labels";</jsp:scriptlet>
  6. <jsp:text><HTML><HEAD>
  7. <jsp:directive.include file="head.jsp"/>
  8. </HEAD>
  9. <BODY bgcolor="#FFFFFF" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
  10. <TABLE width="780" cellspacing="0" cellpadding="0" border="0">
  11. <jsp:directive.include file="navbar.jsp"/>
  12. <TR><TD><TABLE width="100%" cellspacing="0" cellpadding="0" border="0">
  13. <TR><TD width="21"><IMG src="images/s.gif" width="21" rowspan="10"/></TD><TD width="100%">
  14. <H1>Labels:</H1>
  15. <TABLE cellspacing="4" cellpadding="3">
  16. <THEAD><TR><TH>Label</TH><TH>Description</TH></TR></THEAD>
  17. <TBODY>
  18. <jsp:scriptlet>
  19.  
  20. class LabelComparator implements Comparator {
  21. public int compare(Object o1, Object o2) {
  22. return ((Label)o1).getName().compareTo(((Label)o2).getName());
  23. }
  24. public boolean equals(Object o) {
  25. return this.equals(o);
  26. }
  27. }
  28.  
  29. TreeSet ts = new TreeSet(new LabelComparator());
  30.  
  31. Enumeration en = Label.getLabels(env);
  32. while (en.hasMoreElements()) {
  33. ts.add(en.nextElement());
  34. }
  35.  
  36. Iterator itr = ts.iterator();
  37. while (itr.hasNext()) {
  38. Label lbl = (Label)itr.next();
  39. out.print("&lt;TR&gt;");
  40. out.print("&lt;TD&gt;"+lbl.getName()+"&lt;/TD&gt;");
  41. out.print("&lt;TD&gt;"+lbl.getDescription()+"&lt;/TD&gt;");
  42. out.print("&lt;/TR&gt;");
  43. }
  44. </jsp:scriptlet>
  45. </TBODY></TABLE>
  46.  
  47. </TD></TR>
  48. </TABLE></TD></TR>
  49. </TABLE></BODY></HTML></jsp:text>
  50. </jsp:root>
# Change User Description Committed
#5 2206 David Markley Removed all use of the common tag library and any specific inclusion
of the crimson API.
23 years ago
#4 2070 David Markley Updated to work with Tomcat 4.0.4 23 years ago
#3 1842 David Markley Updated pages to include titles and added view and diff pages. 23 years ago
#2 1836 David Markley Added file information and improved item listings. 23 years ago
#1 1824 David Markley Added initial files for p4jsp. 23 years ago