C H A P T E R 32 |
Resource Bundle Model |
The Resource Bundle Model enables a developer to use a resource bundle to retrieve localized values. Model field names used in this model are the names of these resources. A common use of the resource bundle model is to localize a page by forming any localized content with static text display fields and binding the display fields to a resource bundle model. The locale used by the model to find resources at runtime may be set programmatically. If not set, the model will use the default system locale.
This model component has a model field chooser which will display the available resources if the resource bundle has been set. In addition, this model supports predefined model fields which encapsulate a resource name. In this way, if resource names change in the bundle, clients of the model will be insulated from the resource name change. Another possible use of the model fields would be to dynamically change a field's resource name at runtime without affecting clients bound to the model field.
The fully qualified resource name of the bundle (for example, "com/sun/jato/Bundle"). |
||
Copyright © 2003, Sun Microsystems, Inc. All rights reserved.