1 53 54 106 107 package com.Yasna.forum.tags; 108 109 import java.io.*; 110 import javax.servlet.*; 111 import javax.servlet.jsp.*; 112 import javax.servlet.jsp.tagext.*; 113 import javax.servlet.http.*; 114 import com.Yasna.forum.tags.*; 115 116 140 141 public class PostMessageTag extends TagSupport 142 { 143 144 150 public final int doStartTag() throws JspException 151 { 152 PostTag pt = null; 154 try { 155 pt = (PostTag)this.findAncestorWithClass(this, 156 Class.forName("com.Yasna.forum.tags.PostTag")); 157 } catch(Exception e) { 158 } 159 160 if( pt == null ) { 162 throw new JspException("Jive post_forum tag must be nested inside a post tag"); 163 } 164 165 if( pt.postMessage() && !pt.isPreview() ) 166 return EVAL_BODY_INCLUDE; 167 168 return SKIP_BODY; 169 } 170 171 } 172 | Popular Tags |