com.bea.wlw.netui.tags.databinding.bundle
Class BundleContext
java.lang.Object
com.bea.wlw.netui.tags.databinding.bundle.BundleContext
public class BundleContext
- extends Object
An object that acts as a storage location for ResourceBundles that are
declared inside of a JSP. This object is cached in the PageContext
and is re-created on every page that declares a bundle with the
DeclareBundle
tag.
- Exclude:
Field Summary |
static String |
DEFAULT_STRUTS_BUNDLE_NAME
|
static String |
KEY
The attribute name under which a BundleContext object will be stored in a
PageContext attribute map during the rendering of the page. |
KEY
public static final String KEY
- The attribute name under which a BundleContext object will be stored in a
PageContext attribute map during the rendering of the page.
- See Also:
- Constant Field Values
DEFAULT_STRUTS_BUNDLE_NAME
public static final String DEFAULT_STRUTS_BUNDLE_NAME
- See Also:
- Constant Field Values
addBundle
public void addBundle(String name,
String bundleName)
- Add a bundle to the bundle set. Both the name and properties
are assumed to be non-null; the Bundle tag should check
these before adding them to the BundleContext.
- Parameters:
name
- the name of the bundlebundleName
- the path to the ResourceBundle
file that contains the messages
addBundle
public void addBundle(String name,
String bundleName,
Locale localeOverride)
getBundleNames
public Iterator getBundleNames()
containsBundle
public boolean containsBundle(String name)
getBundle
public BundleContext.BundleNode getBundle(String name)
- Throws:
MissingResourceException
- if an error occurs while loading a properties file
toString
public String toString()
- Overrides:
toString
in class Object
createBundleNode
public static BundleContext.BundleNode createBundleNode(String name,
Object messageResource,
Locale locale)