Class 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 attribute type 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.
      • Fields 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 
      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
      • 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 Detail

      • m_type

        protected java.lang.String m_type
        Device for output.
    • Method Detail

      • doEndTag

        public int doEndTag()
        Close the device tag.

        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.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 interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.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 interface javax.servlet.jsp.tagext.Tag
        Overrides:
        release in class javax.servlet.jsp.tagext.BodyTagSupport
      • setType

        public void setType​(java.lang.String type)
        Sets the type for the device.

        Parameters:
        type - the device type