1 26 27 package org.objectweb.jonas.webapp.taglib; 28 29 import javax.servlet.jsp.JspException ; 30 31 public class JonasGridNameTag extends GridColTag { 32 33 35 private boolean bold = true; 36 37 public boolean isBold() { 38 return bold; 39 } 40 41 public void setBold(boolean bold) { 42 this.bold = bold; 43 } 44 45 47 52 public int doStartTag() 53 throws JspException { 54 setNowrap(true); 55 setAlign("right"); 56 setValign("top"); 57 setWidth("19%"); 58 return super.doStartTag(); 59 } 60 61 public void release() { 62 super.release(); 63 } 64 65 67 protected String prepareAfterTag() { 68 StringBuffer sb = new StringBuffer ("<td width=\"1%\""); 69 if (getStyleClass() != null) { 70 sb.append(" class=\""); 71 sb.append(getStyleClass()); 72 sb.append("\""); 73 } 74 sb.append("> </td>"); 75 return sb.toString(); 76 } 77 78 protected String prepareBeforeBody() { 79 if (bold == true) { 80 return "<b>"; 81 } 82 return ""; 83 } 84 85 protected String prepareAfterBody() { 86 if (bold == true) { 87 return "</b>"; 88 } 89 return ""; 90 } 91 } | Popular Tags |