org.apache.tiles.jsp.taglib
public class: InsertAttributeTag [javadoc |
source]
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport
org.apache.tiles.jsp.taglib.ContainerTagSupport
org.apache.tiles.jsp.taglib.RenderTagSupport
org.apache.tiles.jsp.taglib.InsertAttributeTag
All Implemented Interfaces:
PutAttributeTagParent, BodyTag, IterationTag, Serializable
Direct Known Subclasses:
GetAsStringTag
This is the tag handler for <tiles:attribute>, which defines an
attribute. If the attribute value is a template or a definition, its
attributes and its template can be overridden.
- version:
$ - Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200 (Wed, 11 Apr 2007) $
| Field Summary |
|---|
| protected String | name | Name to insert. |
| protected Object | value | The value of the attribute. |
| protected AttributeContext | evaluatingContext | The context used to evaluate the attribute. |
| Methods from org.apache.tiles.jsp.taglib.RenderTagSupport: |
|---|
|
doStartTag, execute, getPreparer, isFlush, isIgnore, processNestedTag, release, render, setFlush, setIgnore, setPreparer |
| Methods from javax.servlet.jsp.tagext.TagSupport: |
|---|
|
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
| Method from org.apache.tiles.jsp.taglib.InsertAttributeTag Detail: |
public String getName() {
return name;
}
Returns the name of the attribute. |
public Object getValue() {
return value;
}
|
public void release() {
super.release();
this.name = null;
this.value = null;
}
|
protected void render() throws IOException, JspException, TilesException {
Attribute attr = (Attribute) value;
if (attr == null && evaluatingContext != null) {
attr = evaluatingContext.getAttribute(name);
}
if (attr == null && ignore) {
return;
}
if (attr == null) {
if (name != null) {
throw new TilesException("Attribute '" + name + "' not found.");
} else {
throw new TilesException("No attribute name or value has been provided.");
}
}
render(attr);
}
|
protected void render(Attribute attr) throws IOException, TilesException {
container.render(attr, pageContext.getOut(), pageContext);
}
Renders an attribute for real. |
public void setName(String value) {
this.name = value;
}
Sets the name of the attribute. |
public void setValue(Object value) {
this.value = value;
}
|
protected void startContext(PageContext context) {
if (container != null) {
evaluatingContext = container.getAttributeContext(context);
}
super.startContext(context);
}
|