1 13 package info.magnolia.cms.taglibs.util; 14 15 import javax.servlet.jsp.JspException ; 16 import javax.servlet.jsp.tagext.TagSupport ; 17 18 19 25 public class AAttribute extends TagSupport { 26 27 30 private static final long serialVersionUID = 222L; 31 32 35 private String value; 36 37 40 private String name; 41 42 46 public void setName(String name) { 47 this.name = name; 48 } 49 50 54 public void setValue(String value) { 55 this.value = value; 56 } 57 58 61 public int doEndTag() throws JspException { 62 63 AHref parent = (AHref) findAncestorWithClass(this, AHref.class); 64 if (parent == null) { 65 throw new JspException ("nesting error"); } 67 parent.setAttribute(this.name, this.value); 68 69 return EVAL_PAGE; 70 } 71 72 75 public void release() { 76 this.name = null; 77 this.value = null; 78 super.release(); 79 } 80 81 } 82 | Popular Tags |