1 53 54 106 107 package com.Yasna.forum.tags; 108 109 import java.io.*; 110 import java.util.*; 111 import java.text.*; 112 import javax.servlet.*; 113 import javax.servlet.jsp.*; 114 import javax.servlet.jsp.tagext.*; 115 import javax.servlet.http.*; 116 import com.Yasna.forum.*; 117 import com.Yasna.forum.tags.*; 118 119 142 public class WhileNewChildTag extends BodyTagSupport 143 { 144 private WalkTag wt = null; 145 146 151 public final int doStartTag() throws JspException 152 { 153 try { 155 wt = (WalkTag)this.findAncestorWithClass(this, 156 Class.forName("com.Yasna.forum.tags.WalkTag")); 157 } catch(Exception e) { 158 return SKIP_BODY; 159 } 160 if( wt.isDeeperMessage() ) 162 return EVAL_BODY_TAG; 163 return SKIP_BODY; 164 } 165 166 171 public final int doAfterBody() throws JspException 172 { 173 if( wt.isDeeperMessage() ) 174 return EVAL_BODY_TAG; 175 return SKIP_BODY; 176 } 177 178 183 public final int doEndTag() throws JspException 184 { 185 try 186 { 187 if(bodyContent != null) 188 bodyContent.writeOut(bodyContent.getEnclosingWriter()); 189 } catch(java.io.IOException e) 190 { 191 throw new JspException("IO Error: " + e.getMessage()); 192 } 193 return EVAL_PAGE; 194 } 195 196 } 197 | Popular Tags |