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, prefixFields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContentFields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAGFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintInternal action method.javax.servlet.jsp.jstl.fmt.LocalizationContextReturns the localization context to use.static javax.servlet.jsp.jstl.fmt.LocalizationContextgetLocalizationContext(javax.servlet.jsp.PageContext pc, String basename) Returns the initialized localization context.voidrelease()voidsetBasename(String bn) Sets the basename attribute value.voidSets the prefix attribute value.Methods inherited from class org.apache.taglibs.standard.tag.common.fmt.BundleSupport
doEndTag, getLocalizationContext, getPrefixMethods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContentMethods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classorg.apache.taglibs.standard.tag.el.fmt.BundleTag- Returns:
- EVAL_BODY_BUFFERED
- Throws:
javax.servlet.jsp.JspException- See Also:
-
getLocalizationContext
Returns the localization context to use.- Overrides:
getLocalizationContextin classorg.apache.taglibs.standard.tag.common.fmt.BundleSupport- See Also:
-
release
- Specified by:
releasein interfacejavax.servlet.jsp.tagext.Tag- Overrides:
releasein classorg.apache.taglibs.standard.tag.el.fmt.BundleTag- See Also:
-
setBasename
Sets the basename attribute value.- Overrides:
setBasenamein classorg.apache.taglibs.standard.tag.el.fmt.BundleTag- Parameters:
bn- the basename attribute value- See Also:
-
setPrefix
Sets the prefix attribute value.- Overrides:
setPrefixin classorg.apache.taglibs.standard.tag.el.fmt.BundleTag- Parameters:
pf- the prefix attribute value- See Also:
-