Package org.opencms.jsp
Class CmsJspTagDevice
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.opencms.jsp.CmsJspTagDevice
- All Implemented Interfaces:
Serializable,javax.servlet.jsp.tagext.BodyTag,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
This class provides a
<cms:device type="...">-Tag
with the attribute type to specify the device.- Since:
- 8.0.0
- See Also:
-
Field Summary
FieldsFields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContentFields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAGFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Close the device tag.intDecides on the base of the device selector interface whether the user's device is in the selected device types or not.getType()Returns the device type.voidrelease()Releases any resources we may have (or inherit).voidSets the type for the device.Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContentMethods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
Field Details
-
m_type
Device for output.
-
-
Constructor Details
-
CmsJspTagDevice
public CmsJspTagDevice()
-
-
Method Details
-
doEndTag
Close the device tag.- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.BodyTagSupport- Returns:
Tag.EVAL_PAGE
-
doStartTag
Decides on the base of the device selector interface whether the user's device is in the selected device types or not.If the user's device is in the list of possible devices the content inside the tag is printed out and otherwise the content won't be printed out.
- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjavax.servlet.jsp.tagext.BodyTagSupport- Returns:
Tag.EVAL_BODY_INCLUDETag.SKIP_BODY
-
getType
Returns the device type.- Returns:
- the device type
-
release
Releases any resources we may have (or inherit).- Specified by:
releasein interfacejavax.servlet.jsp.tagext.Tag- Overrides:
releasein classjavax.servlet.jsp.tagext.BodyTagSupport
-
setType
Sets the type for the device.- Parameters:
type- the device type
-