com.sun.faces.taglib.jsf_core
public class LoadBundleTag extends javax.servlet.jsp.tagext.TagSupport
Tag action that loads the specified ResourceBundle as a Map into
the request scope of the current FacesContext
.
The user is discouraged from using multiple dot syntax in their
resource bundle keys. For example, for the bundle loaded under the
var msgs
, this key: index.page.title
is
discouraged. If your application requires this syntax for resource
bundle keys, they may be referred to in the page with a syntax like
this: #{msgs["index.page.title"]}.
Modifier and Type | Class and Description |
---|---|
private static class |
LoadBundleTag.LoadBundleComponent |
Modifier and Type | Field and Description |
---|---|
private javax.el.ValueExpression |
basenameExpression |
private static java.util.logging.Logger |
LOGGER |
(package private) static java.lang.String |
PRE_VIEW_LOADBUNDLES_LIST_ATTR_NAME |
private java.lang.String |
var |
Constructor and Description |
---|
LoadBundleTag() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
addChildToParentTagAndParentComponent(javax.faces.component.UIComponent child,
javax.faces.webapp.UIComponentClassicTagBase parentTag) |
private javax.faces.component.UIComponent |
createNewLoadBundleComponent(java.lang.String var,
java.util.Map toStore) |
int |
doStartTag()
Load the
ResourceBundle named by our
basename property. |
private javax.faces.webapp.UIComponentClassicTagBase |
getParentUIComponentTag() |
(package private) static java.util.List<javax.faces.component.UIComponent> |
getPreViewLoadBundleComponentList() |
void |
release()
Release references to any acquired resources.
|
void |
setBasename(javax.el.ValueExpression basename)
Set the base name of the
ResourceBundle to be
loaded. |
void |
setVar(java.lang.String var)
Set the name of the attribute in the request scope under which
to store the
ResourceBundle Map . |
static final java.lang.String PRE_VIEW_LOADBUNDLES_LIST_ATTR_NAME
private static final java.util.logging.Logger LOGGER
private javax.el.ValueExpression basenameExpression
private java.lang.String var
public void setBasename(javax.el.ValueExpression basename)
Set the base name of the ResourceBundle
to be
loaded.
basename
- the ValueExpression which will resolve the basenamepublic void setVar(java.lang.String var)
Set the name of the attribute in the request scope under which
to store the ResourceBundle
Map
.
var
- the variable name to export the loaded ResourceBundle topublic int doStartTag() throws javax.servlet.jsp.JspException
Load the ResourceBundle
named by our
basename
property.
Map
implementation and store the Map
in
the request attr set of under the key given by our
var
property.doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- if a JSP error occursstatic void addChildToParentTagAndParentComponent(javax.faces.component.UIComponent child, javax.faces.webapp.UIComponentClassicTagBase parentTag)
static java.util.List<javax.faces.component.UIComponent> getPreViewLoadBundleComponentList()
private javax.faces.component.UIComponent createNewLoadBundleComponent(java.lang.String var, java.util.Map toStore)
private javax.faces.webapp.UIComponentClassicTagBase getParentUIComponentTag()
UIComponentClassicTagBase
instance
that represents the tag in the page to which the special
component should be added as a childpublic void release()
Release references to any acquired resources.
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.TagSupport
Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.