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:
java.io.Serializable
,javax.servlet.jsp.tagext.BodyTag
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
public class CmsJspTagDevice extends javax.servlet.jsp.tagext.BodyTagSupport
This class provides a<cms:device type="...">
-Tag with the attributetype
to specify the device.- Since:
- 8.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
m_type
Device for output.
-
Constructor Summary
Constructors Constructor Description CmsJspTagDevice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
Close the device tag.int
doStartTag()
Decides on the base of the device selector interface whether the user's device is in the selected device types or not.java.lang.String
getType()
Returns the device type.void
release()
Releases any resources we may have (or inherit).void
setType(java.lang.String type)
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
-
-
-
-
Field Detail
-
m_type
protected java.lang.String m_type
Device for output.
-
-
Constructor Detail
-
CmsJspTagDevice
public CmsJspTagDevice()
-
-
Method Detail
-
doEndTag
public int 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
public int 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
public java.lang.String getType()
Returns the device type.- Returns:
- the device type
-
release
public void 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
public void setType(java.lang.String type)
Sets the type for the device.- Parameters:
type
- the device type
-
-