| 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 35 public class NoRowTag extends BodyTagSupport { 36 37 PackageTag parent; 38 39 42 public int doStartTag() throws JspException { 43 44 parent = (PackageTag) findAncestorWithClass(this, PackageTag.class); 45 46 if ((parent != null) && (parent.getNoRows())) { 48 49 return EVAL_BODY_TAG; 50 } else { 51 return SKIP_BODY; 52 } 53 } 54 55 58 public int doAfterBody() throws JspException { 59 60 BodyContent body = getBodyContent(); 61 try { 62 body.writeOut(getPreviousOut()); 63 } catch (IOException e) { 64 parent.printMessage("Error in IO body noRow" + 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 |