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 |
doEndTag()
Default processing of the end tag returning EVAL_PAGE.
|
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:
Check if a match exists between the ordered set of preferred
locales and the available locales, for the given base name.
|
String |
getPrefix() |
void |
release()
Release state.
|
doAfterBody, 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 int doEndTag() throws JspException
BodyTagSupport
doEndTag
in interface Tag
doEndTag
in class BodyTagSupport
JspException
- if an error occurred while processing this tagTag.doEndTag()
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)
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
- PageContext Page in which the resource bundle with the
given base name is requestedbasename
- Resource bundle base nameCopyright © 2018 JBoss by Red Hat. All rights reserved.