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
bodyContent
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Close the device tag.int
Decides 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.void
release()
Releases any resources we may have (or inherit).void
Sets the type for the device.Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in 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:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Returns:
Tag.EVAL_BODY_INCLUDE
Tag.SKIP_BODY
-
getType
Returns the device type.- Returns:
- the device type
-
release
Releases any resources we may have (or inherit).- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classjavax.servlet.jsp.tagext.BodyTagSupport
-
setType
Sets the type for the device.- Parameters:
type
- the device type
-