01: package com.technoetic.xplanner.tags;
02:
03: import javax.servlet.jsp.JspException;
04: import javax.servlet.jsp.tagext.BodyTagSupport;
05:
06: public class ContentTitleArgTag extends BodyTagSupport {
07: private Object value;
08:
09: public int doEndTag() throws JspException {
10: ContentTitleTag tag = (ContentTitleTag) findAncestorWithClass(
11: this , ContentTitleTag.class);
12: if (value != null) {
13: tag.addTitleArgument(value);
14: } else {
15: tag.addTitleArgument(getBodyContent().getString());
16: }
17: return EVAL_PAGE;
18: }
19:
20: public void setValue(Object value) {
21: this .value = value;
22: }
23:
24: public void release() {
25: super.release();
26: value = null;
27: }
28: }
|