Class CmsJspTagBundle

  • 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 CmsJspTagBundle
    extends org.apache.taglibs.standard.tag.el.fmt.BundleTag
    Provides tag access to OpenCms resource bundles.

    This replaces the <fmt:bundle basename=""> tag which is not capable of using OpenCms resource bundles.

    You can use <fmt:message key=""> tags inside the <cms:bundle basename=""> tag as usual.

    Since:
    8.5.2
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.taglibs.standard.tag.common.fmt.BundleSupport

        basename, prefix
      • 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
      CmsJspTagBundle()
      Empty constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int doStartTag()
      Internal action method.
      javax.servlet.jsp.jstl.fmt.LocalizationContext getLocalizationContext()
      Returns the localization context to use.
      static javax.servlet.jsp.jstl.fmt.LocalizationContext getLocalizationContext​(javax.servlet.jsp.PageContext pc, java.lang.String basename)
      Returns the initialized localization context.
      void release()  
      void setBasename​(java.lang.String bn)
      Sets the basename attribute value.
      void setPrefix​(java.lang.String pf)
      Sets the prefix attribute value.
      • Methods inherited from class org.apache.taglibs.standard.tag.common.fmt.BundleSupport

        doEndTag, getLocalizationContext, getPrefix
      • 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
    • Method Detail

      • getLocalizationContext

        public static javax.servlet.jsp.jstl.fmt.LocalizationContext getLocalizationContext​(javax.servlet.jsp.PageContext pc,
                                                                                            java.lang.String basename)
        Returns the initialized localization context.

        Parameters:
        pc - the current page context
        basename - the bas name of the bundle
        Returns:
        the initialized localization context
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Internal action method.

        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class org.apache.taglibs.standard.tag.el.fmt.BundleTag
        Returns:
        EVAL_BODY_BUFFERED
        Throws:
        javax.servlet.jsp.JspException
        See Also:
        Tag.doStartTag()
      • getLocalizationContext

        public javax.servlet.jsp.jstl.fmt.LocalizationContext getLocalizationContext()
        Returns the localization context to use.

        Overrides:
        getLocalizationContext in class org.apache.taglibs.standard.tag.common.fmt.BundleSupport
        See Also:
        BundleSupport.getLocalizationContext()
      • release

        public void release()
        Specified by:
        release in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        release in class org.apache.taglibs.standard.tag.el.fmt.BundleTag
        See Also:
        BundleTag.release()
      • setBasename

        public void setBasename​(java.lang.String bn)
        Sets the basename attribute value.

        Overrides:
        setBasename in class org.apache.taglibs.standard.tag.el.fmt.BundleTag
        Parameters:
        bn - the basename attribute value
        See Also:
        BundleTag.setBasename(java.lang.String)
      • setPrefix

        public void setPrefix​(java.lang.String pf)
        Sets the prefix attribute value.

        Overrides:
        setPrefix in class org.apache.taglibs.standard.tag.el.fmt.BundleTag
        Parameters:
        pf - the prefix attribute value
        See Also:
        BundleTag.setPrefix(java.lang.String)