1 26 27 package org.objectweb.jonas.webapp.taglib; 28 29 import javax.servlet.jsp.JspException ; 30 31 public class GridColTag extends GridTableBaseTag { 32 33 35 private boolean nowrap = false; 36 private int colspan = -1; 37 private int rowspan = -1; 38 39 public boolean isNowrap() { 40 return nowrap; 41 } 42 43 public void setNowrap(boolean nowrap) { 44 this.nowrap = nowrap; 45 } 46 47 public int getColspan() { 48 return colspan; 49 } 50 51 public void setColspan(int colspan) { 52 this.colspan = colspan; 53 } 54 55 public int getRowspan() { 56 return rowspan; 57 } 58 59 public void setRowspan(int rowspan) { 60 this.rowspan = rowspan; 61 } 62 63 65 68 protected String getHtmlElement() { 69 return "td"; 70 } 71 72 75 protected String prepareAttributes() throws JspException { 76 StringBuffer sb = new StringBuffer (); 77 if (isNowrap()) { 79 sb.append(" nowrap"); 80 } 81 sb.append(prepareAttribute("colspan", colspan)); 83 sb.append(prepareAttribute("rowspan", rowspan)); 85 sb.append(super.prepareAttributes()); 87 88 return sb.toString(); 89 } 90 91 protected String getDefaultBody() { 92 return " "; 93 } 94 95 97 100 public void release() { 101 super.release(); 102 nowrap = false; 103 } 104 } | Popular Tags |