Package com.sun.faces.taglib.jsf_core
Class LoadBundleTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
com.sun.faces.taglib.jsf_core.LoadBundleTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,Serializable
public class LoadBundleTag
extends jakarta.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"]}.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description LoadBundleTag() -
Method Summary
Modifier and Type Method Description intdoStartTag()Load theResourceBundlenamed by ourbasenameproperty.voidrelease()Release references to any acquired resources.voidsetBasename(jakarta.el.ValueExpression basename)Set the base name of theResourceBundleto be loaded.voidsetVar(String var)Set the name of the attribute in the request scope under which to store theResourceBundleMap.
-
Constructor Details
-
LoadBundleTag
public LoadBundleTag()
-
-
Method Details
-
setBasename
public void setBasename(jakarta.el.ValueExpression basename)Set the base name of the
ResourceBundleto be loaded.- Parameters:
basename- the ValueExpression which will resolve the basename
-
setVar
Set the name of the attribute in the request scope under which to store the
ResourceBundleMap.- Parameters:
var- the variable name to export the loaded ResourceBundle to
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionLoad the
Wrap it in an immutableResourceBundlenamed by ourbasenameproperty.Mapimplementation and store theMapin the request attr set of under the key given by ourvarproperty.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException- if a JSP error occurs
-
release
public void release()Release references to any acquired resources.
- Specified by:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.tagext.TagSupport
-