1 21 22 package org.opensubsystems.patterns.scrollabletable.www; 23 24 import javax.servlet.jsp.JspException ; 25 26 import org.opensubsystems.core.www.BlockElementTag; 27 import org.opensubsystems.core.www.TagUtils; 28 29 40 public class ScrollableTableFooterTag extends BlockElementTag 41 { 42 44 47 private static final long serialVersionUID = 1793805483103646811L; 48 49 51 54 public ScrollableTableFooterTag() 55 { 56 super("clsScrollableTable", BlockElementTag.DIV_BLOCK_ELEMENT); 57 } 58 59 61 64 public int doStartTag( 65 ) throws JspException 66 { 67 StringBuffer sbHtml = null; 68 Object objTemp; 69 String strScrollableTableId; 70 71 objTemp = getCachedContent(ScrollableTableTag.ACTIVE_SCROLLABLE_TABLE_ID, 72 false).trim(); 73 if (objTemp == null) 74 { 75 throw new JspException ("Cannot find scrollable table id on the page. Probable" + 76 " cause is that the scrollable table open tag is missing."); 77 } 78 strScrollableTableId = (String )objTemp; 79 80 sbHtml = new StringBuffer (); 81 82 86 87 sbHtml.append("<div id=\""); 89 sbHtml.append(strScrollableTableId); 90 sbHtml.append("footer\""); 91 if ((m_strCssclass != null) && (m_strCssclass.length() > 0)) 92 { 93 sbHtml.append(" class=\""); 94 sbHtml.append(m_strCssclass); 95 sbHtml.append("Footer"); 96 sbHtml.append("\""); 97 } 98 sbHtml.append(">"); 99 100 TagUtils.write(pageContext, sbHtml.toString()); 101 102 return (EVAL_BODY_INCLUDE); 103 } 104 105 108 public int doEndTag( 109 ) throws JspException 110 { 111 TagUtils.write(pageContext, "</div>"); 113 114 return (EVAL_PAGE); 115 } 116 } 117 | Popular Tags |