TableTag parent = (TableTag) findAncestorWithClass(this, TableTag.class);
// The tag is evaluated only once, at the first iteration
if (parent.isFirstIteration()) {
HtmlCaption caption = new HtmlCaption();
caption.setId(id);
caption.addCssClass(cssClass);
caption.addCssStyle(cssStyle);
caption.setTitle(StringUtils.escape(this.escapeXml, this.title));
caption.addContent(getBodyContent().getString());
parent.getTable().setCaption(caption);
}
return EVAL_PAGE;