com.sun.faces.taglib.jsf_core
Class LoadBundleTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.sun.faces.taglib.jsf_core.LoadBundleTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

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"]}.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
LoadBundleTag()
           
 
Method Summary
 int doStartTag()
          Load the ResourceBundle named by our basename property.
 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 newVar)
          Set the name of the attribute in the request scope under which to store the ResourceBundle Map.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadBundleTag

public LoadBundleTag()
Method Detail

setBasename

public void setBasename(javax.el.ValueExpression basename)

Set the base name of the ResourceBundle to be loaded.


setVar

public void setVar(java.lang.String newVar)

Set the name of the attribute in the request scope under which to store the ResourceBundle Map.


doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException

Load the ResourceBundle named by our basename property.

Wrap it in an immutable Map implementation and store the Map in the request attr set of under the key given by our var property.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP error occurs

release

public void release()

Release references to any acquired resources.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.