public abstract class StubTag
extends javax.servlet.jsp.tagext.BodyTagSupport
A Stub takes a path but does nothing with it. Stubs are used to 'stub out' what
Metawidget would normally create - either to suppress widget creation entirely or to create child
widgets with a different path.
StubTags differ from FacetTags in that they define a path and override widget creation.
| Constructor and Description |
|---|
StubTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doEndTag() |
Map<String,String> |
getAttributesMap() |
String |
getSavedBodyContent()
Get the body content as saved during
doEndTag. |
void |
setAttributes(String attributes) |
protected void |
setPathInternal(String path)
Sets the path.
|
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContentfindAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValuepublic void setAttributes(String attributes) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspExceptionpublic String getSavedBodyContent()
doEndTag.
It seems getBodyContent().toString only returns a meaningful result while we are
in the doEndTag method. We capture it there for use later.
public int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspExceptionprotected void setPathInternal(String path)
Set by subclasses according to what they prefer to call it (eg. name for Struts,
property for Spring).
Copyright © 2015. All Rights Reserved.