Package org.opencms.jsp
Class CmsJspTagBundle
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.taglibs.standard.tag.common.fmt.BundleSupport
org.apache.taglibs.standard.tag.el.fmt.BundleTag
org.opencms.jsp.CmsJspTagBundle
- All Implemented Interfaces:
Serializable
,javax.servlet.jsp.tagext.BodyTag
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
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:
-
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 -
Method Summary
Modifier and TypeMethodDescriptionint
Internal action method.javax.servlet.jsp.jstl.fmt.LocalizationContext
Returns the localization context to use.static javax.servlet.jsp.jstl.fmt.LocalizationContext
getLocalizationContext
(javax.servlet.jsp.PageContext pc, String basename) Returns the initialized localization context.void
release()
void
setBasename
(String bn) Sets the basename attribute value.void
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
-
Constructor Details
-
CmsJspTagBundle
public CmsJspTagBundle()Empty constructor.
-
-
Method Details
-
getLocalizationContext
public static javax.servlet.jsp.jstl.fmt.LocalizationContext getLocalizationContext(javax.servlet.jsp.PageContext pc, String basename) Returns the initialized localization context.- Parameters:
pc
- the current page contextbasename
- the bas name of the bundle- Returns:
- the initialized localization context
-
doStartTag
Internal action method.- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classorg.apache.taglibs.standard.tag.el.fmt.BundleTag
- Returns:
- EVAL_BODY_BUFFERED
- Throws:
javax.servlet.jsp.JspException
- See Also:
-
Tag.doStartTag()
-
getLocalizationContext
Returns the localization context to use.- Overrides:
getLocalizationContext
in classorg.apache.taglibs.standard.tag.common.fmt.BundleSupport
- See Also:
-
BundleSupport.getLocalizationContext()
-
release
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classorg.apache.taglibs.standard.tag.el.fmt.BundleTag
- See Also:
-
BundleTag.release()
-
setBasename
Sets the basename attribute value.- Overrides:
setBasename
in classorg.apache.taglibs.standard.tag.el.fmt.BundleTag
- Parameters:
bn
- the basename attribute value- See Also:
-
BundleTag.setBasename(java.lang.String)
-
setPrefix
Sets the prefix attribute value.- Overrides:
setPrefix
in classorg.apache.taglibs.standard.tag.el.fmt.BundleTag
- Parameters:
pf
- the prefix attribute value- See Also:
-
BundleTag.setPrefix(java.lang.String)
-