public abstract class BundleSupport extends BodyTagSupport
Modifier and Type | Field and Description |
---|---|
protected String |
basename |
protected String |
prefix |
bodyContent
id, pageContext
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
BundleSupport() |
Modifier and Type | Method and Description |
---|---|
int |
doStartTag()
Default processing of the start tag returning EVAL_BODY_BUFFERED.
|
LocalizationContext |
getLocalizationContext() |
static LocalizationContext |
getLocalizationContext(PageContext pc)
Gets the default I18N localization context.
|
static LocalizationContext |
getLocalizationContext(PageContext pc,
String basename)
Gets the resource bundle with the given base name, whose locale is
determined as follows:
|
String |
getPrefix() |
void |
release()
Release state.
|
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, setBodyContent
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParent, setPageContext, setParent
public LocalizationContext getLocalizationContext()
public String getPrefix()
public int doStartTag() throws JspException
BodyTagSupport
doStartTag
in interface Tag
doStartTag
in class BodyTagSupport
JspException
- if an error occurred while processing this tagTag.doStartTag()
public void release()
BodyTagSupport
release
in interface Tag
release
in class BodyTagSupport
Tag.release()
public static LocalizationContext getLocalizationContext(PageContext pc)
pc
- Page in which to look up the default I18N localization contextpublic static LocalizationContext getLocalizationContext(PageContext pc, String basename)
Check if a match exists between the ordered set of preferred locales and the available locales, for the given base name. The set of preferred locales consists of a single locale (if the javax.servlet.jsp.jstl.fmt.locale configuration setting is present) or is equal to the client's preferred locales determined from the client's browser settings.
If no match was found in the previous step, check if a match exists between the fallback locale (given by the javax.servlet.jsp.jstl.fmt.fallbackLocale configuration setting) and the available locales, for the given base name.
pc
- Page in which the resource bundle with the
given base name is requestedbasename
- Resource bundle base nameCopyright © 2017 JBoss by Red Hat. All rights reserved.