Class CmsJspTagNavigation

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.opencms.jsp.CmsJspScopedVarBodyTagSuport
org.opencms.jsp.CmsJspTagNavigation
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

Implementation of the <cms:navigation var="..." /> tag, used to access OpenCms VFS navigation information on a JSP with the EL.

Since:
8.0
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Constants for type attribute interpretation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected CmsObject
    The CmsObject for the current user.
    protected String
    The optional end level for the navigation.
    protected Locale
    The locale for which the property should be read.
    protected String
    The optional parameter for the navigation.
    protected String
    The optional resource for the navigation.
    protected String
    The optional start level for the navigation.
    The navigation type.

    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
    Empty constructor, required for JSP tags.
    CmsJspTagNavigation(javax.servlet.jsp.PageContext context)
    Constructor used for scriptlet code.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    Returns the (optional) end level for the navigation.
    Returns the optional parameter for the navigation.
    Returns the (optional) resource for the navigation.
    Returns the (optional) start level for the navigation.
    Returns the selected navigation type.
    protected void
    Initializes this formatter tag.
    void
     
    void
    setEndLevel(String endLevel)
    Sets the (optional) end level for the navigation.
    void
    setLocale(String locale)
    Sets the locale for which the property should be read.
    void
    Sets the optional parameter for the navigation.
    void
    setResource(String resource)
    Sets the (optional) resource for the navigation.
    void
    setStartLevel(String startLevel)
    Sets the (optional) start level for the navigation.
    void
    Sets the selected navigation type.

    Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

    doAfterBody, doEndTag, 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

  • Constructor Details

    • CmsJspTagNavigation

      Empty constructor, required for JSP tags.

    • CmsJspTagNavigation

      public CmsJspTagNavigation(javax.servlet.jsp.PageContext context)
      Constructor used for scriptlet code.

      Parameters:
      context - the JSP page context
  • Method Details

    • doStartTag

      Specified by:
      doStartTag in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
      Throws:
      CmsIllegalArgumentException
      See Also:
      • Tag.doStartTag()
    • getEndLevel

      public String getEndLevel()
      Returns the (optional) end level for the navigation.

      Returns:
      the (optional) end level for the navigation
    • getParam

      public String getParam()
      Returns the optional parameter for the navigation.

      Returns:
      the optional parameter for the navigation
    • getResource

      public String getResource()
      Returns the (optional) resource for the navigation.

      Returns:
      the (optional) resource for the navigation
    • getStartLevel

      Returns the (optional) start level for the navigation.

      Returns:
      the (optional) start level for the navigation
    • getType

      public String getType()
      Returns the selected navigation type.

      This must match one of the elements in CmsJspTagNavigation.Type.

      Returns:
      the selected navigation type
    • release

      public void release()
      Specified by:
      release in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      release in class CmsJspScopedVarBodyTagSuport
      See Also:
      • Tag.release()
    • setEndLevel

      public void setEndLevel(String endLevel)
      Sets the (optional) end level for the navigation.

      Parameters:
      endLevel - the (optional) end level for the navigation
    • setLocale

      public void setLocale(String locale)
      Sets the locale for which the property should be read.
      Parameters:
      locale - the locale for which the property should be read.
    • setParam

      public void setParam(String param)
      Sets the optional parameter for the navigation.

      Parameters:
      param - the optional parameter for the navigation to set
    • setResource

      public void setResource(String resource)
      Sets the (optional) resource for the navigation.

      Parameters:
      resource - the (optional) resource for the navigation
    • setStartLevel

      public void setStartLevel(String startLevel)
      Sets the (optional) start level for the navigation.

      Parameters:
      startLevel - the (optional) start level for the navigation
    • setType

      public void setType(String type)
      Sets the selected navigation type.

      This must match one of the elements in CmsJspTagNavigation.Type.

      Parameters:
      type - the navigation type to set
    • init

      protected void init()
      Initializes this formatter tag.