1 23 24 package org.dbforms.taglib; 25 26 import org.dbforms.util.Util; 27 28 import javax.servlet.jsp.JspException ; 29 30 31 32 36 public class DbDateLabelTag extends DbLabelTag 37 implements javax.servlet.jsp.tagext.TryCatchFinally { 38 41 public void doCatch(Throwable t) throws Throwable { 42 throw t; 43 } 44 45 46 52 public int doEndTag() throws javax.servlet.jsp.JspException { 53 try { 54 String fieldValue = getFormattedFieldValue(); 55 56 fieldValue = escapeHTML(fieldValue); 59 60 String s = prepareStyles(); 61 62 if (Util.isNull(s)) { 63 pageContext.getOut() 64 .write(fieldValue); 65 } else { 66 pageContext.getOut() 67 .write("<span " + s + ">" + fieldValue + "</span>"); 68 } 69 } catch (Exception e) { 70 throw new JspException ("Error: " + e.getMessage()); 71 } 72 73 return EVAL_PAGE; 74 } 75 76 77 80 public void doFinally() { 81 super.doFinally(); 82 } 83 } 84 | Popular Tags |