1 22 package org.cofax.taglibs; 23 24 import javax.servlet.jsp.*; 25 import javax.servlet.jsp.tagext.*; 26 import java.io.*; 27 28 37 public class FooterTag extends BodyTagSupport { 38 39 PackageTag parent; 40 41 44 public int doStartTag() { 45 46 parent = (PackageTag) findAncestorWithClass(this, PackageTag.class); 47 if ((parent != null) && (!parent.getNoRows())) { 49 return EVAL_BODY_TAG; 50 } else { 51 return SKIP_BODY; 52 } 53 54 } 55 56 59 public int doAfterBody() throws JspException { 60 61 BodyContent body = getBodyContent(); 62 try { 63 body.writeOut(getPreviousOut()); 64 } catch (IOException e) { 65 parent.printMessage("Error in IO body footer" + e); 66 } 67 body.clearBody(); 68 return SKIP_BODY; 69 70 } 71 72 75 public int doEndTag() { 76 return EVAL_PAGE; 77 } 78 79 } 81 | Popular Tags |