1 40 package org.dspace.app.webui.jsptag; 41 42 import javax.servlet.jsp.JspException ; 43 import javax.servlet.jsp.tagext.BodyTagSupport ; 44 import javax.servlet.jsp.tagext.TagSupport ; 45 46 53 public class SidebarTag extends BodyTagSupport 54 { 55 public SidebarTag() 56 { 57 super(); 58 } 59 60 public int doAfterBody() throws JspException 61 { 62 LayoutTag tag = (LayoutTag) TagSupport.findAncestorWithClass(this, 63 LayoutTag.class); 64 65 if (tag == null) 66 { 67 throw new JspException ( 68 "Sidebar tag must be in an enclosing Layout tag"); 69 } 70 71 tag.setSidebar(getBodyContent().getString()); 72 73 return SKIP_BODY; 74 } 75 } 76 | Popular Tags |