ResourceBundleDataBean
|
The ResourceBundleDataBean is used by JSPs to get information from property
files. To find a property file three parameters are needed:
- Property File Name
The base name of the property file you want to look up. For example
"UserRegistrion" is the property file name for
"UserRegistratoin_en_US.properties" or
"UserRegistration_fr_FR.properties". This parameter is set by
setPropertyFileName(String) method. This parameter is mandatory. If in the same
lcation there is a proeprty file with the same name plus "Text"
suffix. For example "UserRegistratoinText_en_US.properties". This
file will also be read by the data bean and the result will be merged into
one.
- Store Directory Name
Different stores have their own property files but these property files might
have the same property file name. To avoid conflict each store should have a
directory to store their property files. To find a property file belong to a
specific store you need to use setStoreDirectory(String) method to set the name
of the directory of that store.
If the store directory is set the databean will only read property file from
that directory.
If the store directory is not set the databean will first look up the property
file from the store relations of the current store (STOREREL table) using store
relation type ("com.ibm.commerce.propertyFiles" defined in STRELTYP
table). If the property file still can not be found the databean will look up
directly from class path.
- Locale
Locale is required to find property files of different languages. It can be
set by setLocale(String) method. If Locale is not set the databean will get the
Locale from command context.
|