1 11 12 package org.jivesoftware.admin; 13 14 import javax.servlet.jsp.JspException ; 15 import javax.servlet.jsp.JspTagException ; 16 17 32 public class SubSidebarTag extends SidebarTag { 33 34 private SidebarTag parent; 35 private String body; 36 37 40 public String getBody() { 41 return body; 42 } 43 44 47 public void setBody(String body) { 48 this.body = body; 49 } 50 51 58 public int doStartTag() throws JspException { 59 parent = (SidebarTag)findAncestorWithClass(this, SidebarTag.class); 61 62 if (parent == null) { 64 throw new JspTagException ("SubSidebarTag with out a parent which is expected to be a SidebarTag"); 65 } 66 return EVAL_BODY_BUFFERED; 67 } 68 69 75 public int doEndTag() throws JspException { 76 setBody(bodyContent.getString()); 77 parent.setSubSidebar(this); 78 return EVAL_PAGE; 79 } 80 } | Popular Tags |