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 143 public class WhileNewParentTag extends BodyTagSupport 144 { 145 private WalkTag wt = null; 146 147 152 public final int doStartTag() throws JspException 153 { 154 try { 156 wt = (WalkTag)this.findAncestorWithClass(this, 157 Class.forName("com.Yasna.forum.tags.WalkTag")); 158 } catch(Exception e) { 159 return SKIP_BODY; 160 } 161 162 if( wt.isShallowerMessage() ) 164 return EVAL_BODY_TAG; 165 return SKIP_BODY; 166 } 167 168 173 public final int doAfterBody() throws JspException 174 { 175 if( wt.isShallowerMessage() ) 176 return EVAL_BODY_TAG; 177 return SKIP_BODY; 178 } 179 180 185 public final int doEndTag() throws JspException 186 { 187 try 188 { 189 if(bodyContent != null) 190 bodyContent.writeOut(bodyContent.getEnclosingWriter()); 191 } catch(java.io.IOException e) 192 { 193 throw new JspException("IO Error: " + e.getMessage()); 194 } 195 return EVAL_PAGE; 196 } 197 198 } 199 | Popular Tags |