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