Module com.semanticcms.core.taglib
Package com.semanticcms.core.taglib
Class ElementTag<E extends Element>
java.lang.Object
javax.servlet.jsp.tagext.SimpleTagSupport
com.semanticcms.core.taglib.ElementTag<E>
- All Implemented Interfaces:
ElementWriter
,DynamicAttributes
,JspTag
,SimpleTag
public abstract class ElementTag<E extends Element>
extends SimpleTagSupport
implements DynamicAttributes, ElementWriter
The base tag for capturing elements.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Adds a dynamic attribute.protected abstract E
Called to create the element from doTag.protected void
doBody
(E element, CaptureLevel captureLevel) This is only called forcaptureLevel >= META
.void
doTag()
Adds this element to the current page, if part of a page.protected void
evaluateAttributes
(E element, ELContext elContext) Resolves all attributes, setting into the created element as appropriate, This is only called forcaptureLevel >= META
.protected E
Gets the element, only available after created.void
setDynamicAttribute
(String uri, String localName, Object value) Deprecated.void
setId
(ValueExpression id) Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.semanticcms.core.model.ElementWriter
writeTo
-
Constructor Details
-
ElementTag
public ElementTag()
-
-
Method Details
-
setId
-
addDynamicAttribute
protected boolean addDynamicAttribute(String uri, String localName, Object value, List<String> expectedPatterns) throws JspTagException Adds a dynamic attribute.- Returns:
true
when added, orfalse
when attribute not expected and has not been added.- Throws:
JspTagException
- See Also:
-
setDynamicAttribute
@Deprecated(forRemoval=false) public void setDynamicAttribute(String uri, String localName, Object value) throws JspException Deprecated.You should probably be implementing inaddDynamicAttribute(java.lang.String, java.lang.String, java.lang.Object, java.util.List)
Sets a dynamic attribute.- Specified by:
setDynamicAttribute
in interfaceDynamicAttributes
- Throws:
JspException
- See Also:
-
doTag
Adds this element to the current page, if part of a page. Sets this element as the current element. Then, if not capturing or capturing META or higher, callsdoBody(E, com.semanticcms.core.servlet.CaptureLevel)
- Specified by:
doTag
in interfaceSimpleTag
- Overrides:
doTag
in classSimpleTagSupport
- Throws:
JspException
IOException
-
createElement
Called to create the element from doTag. This is only called forcaptureLevel >= META
.- Throws:
JspException
IOException
-
getElement
Gets the element, only available after created.- Throws:
IllegalStateException
- if element not yet created- See Also:
-
evaluateAttributes
Resolves all attributes, setting into the created element as appropriate, This is only called forcaptureLevel >= META
. Attributes are resolved before the element is added to any parent node. Typically, deferred expressions will be evaluated here. Overriding methods must call this implementation.- Throws:
JspTagException
-
doBody
This is only called forcaptureLevel >= META
.- Throws:
JspException
IOException
-
addDynamicAttribute(java.lang.String, java.lang.String, java.lang.Object, java.util.List)