public class SetContentBundleTag
extends TagSupport
SetContentBundleTag implements a custom tag, which sets a
LocalizationContext backed with a ContentResourceBundle. This
allows one to use property names as keys in a JSTL formatting action and use
the value of the property as localized message.
The provided resource bundle also uses the resource bundle provided by CQ as a fallback if the underlying Resource does not contain a certain key.
The language/locale of the CQ resource bundle is determined depending on the "source" attribute, which can be either
| Constructor and Description |
|---|
SetContentBundleTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doEndTag()
Sets a default
LocalizationContext in Config with a page
scope. |
java.lang.String |
getBasename() |
java.lang.String |
getLanguage() |
java.lang.String |
getSource() |
void |
setBasename(java.lang.String basename) |
void |
setLanguage(java.lang.String language) |
void |
setSource(java.lang.String source) |
public int doEndTag()
LocalizationContext in Config with a page
scope.#EVAL_PAGE.public void setSource(java.lang.String source)
throws JspException
JspExceptionpublic java.lang.String getSource()
public java.lang.String getLanguage()
null
if the language should be derived from the path of the current resource.public void setLanguage(java.lang.String language)
language - the language that will be used when a resource bundle is
obtained.public java.lang.String getBasename()
null.public void setBasename(java.lang.String basename)
basename - the basename that will be used when a resource bundle is
obtained."Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"