BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.databinding.bundle
Class BundleContext

java.lang.Object
  extended by 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:

Nested Class Summary
static class BundleContext.BundleNode
           
static class BundleContext.NetUIBundleNode
           
static class BundleContext.StrutsBundleNode
           
 
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.
 
Method Summary
 void addBundle(String name, String bundleName)
          Add a bundle to the bundle set.
 void addBundle(String name, String bundleName, Locale localeOverride)
           
 boolean containsBundle(String name)
           
static BundleContext.BundleNode createBundleNode(String name, Object messageResource, Locale locale)
           
 BundleContext.BundleNode getBundle(String name)
           
 Iterator getBundleNames()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Method Detail

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 bundle
bundleName - 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)

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.