1 5 package org.exoplatform.text.template.xhtml; 6 7 import java.io.IOException ; 8 import java.io.Writer ; 9 import java.util.ResourceBundle ; 10 import org.exoplatform.text.template.DataHandler; 11 16 public class HeaderCell extends Cell { 17 18 public HeaderCell(String value) { 19 super(value) ; 20 } 21 22 public void render(XhtmlDataHandlerManager manager, 23 ResourceBundle res, Writer w) throws IOException { 24 w.write("<th") ; 25 if(cssClass_ != null) { 26 w.write(" class='") ;w.write(cssClass_); w.write("'") ; 27 } 28 if(cssStyle_ != null) { 29 w.write(" style='") ;w.write(cssStyle_); w.write("'") ; 30 } 31 if(attributes_ != null) { 32 w.write(attributes_) ; 33 } 34 w.write(">"); 35 if(data_ != null) { 36 DataHandler dh = manager.getDataHandler(dataHandlerType_) ; 37 w.write(resolveValueAsString(data_ ,dh, res)) ; 38 } 39 if(children_.length > 0) { 40 for(int i = 0 ; i < children_.length; i++) { 41 children_[i].render(manager, res, w) ; 42 } 43 } 44 w.write("</th>") ; 45 } 46 } | Popular Tags |