Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tasks : Customizing Property Resource Bundles

Customizing Property Resource Bundles
In TIBCO Forms, you can configure the resource keys in the Property Resource Bundles or .properties files. You can override the values of the existing resource keys, and also add new resource keys. Such customizations may be necessary for:
Adding a new .properties file that is automatically added to all the forms in a project, or to all the projects in a workspace
It is possible to do such customizations at the project level and also at the workspace level.
For information on the default common resources, see Common Resource Keys.
The Merging Process
TIBCO Forms creates a merged bundle of common resources from the overridden resource keys and the default resource keys from the base bundle. This merged bundle resides in the Presentation Resources folder.
The .common sub-folder is hidden by default. To display it, you need to disable the .*resources Project Explorer filter.
The entries in your <custom>.properties file are compared with the existing entries in the default common.properties file. If a resource key already exists in the default file, its value in the <custom>.properties file is used in the merged bundle. If the resource key is not in the default common.properties file, it is added to the new merged file.
If the custom bundle does not specify a file for a specific locale, the entire file from the default bundle is passed on to the merged bundle. Similarly, you can also specify a new locale that is not a part of the default bundle.
Figure 113 illustrates the merging process.
Figure 113 Merging Process
Customizing Property Resource Bundles
1.
Right click the Presentation Resources folder and click New > File.
Figure 114 Creating a New Properties File
The New File dialog appears.
2.
In the New File dialog, name the file with .properties as its extension, and click Finish.
In the example, the name of the file is Customer_Specific and the extension is .properties.
Figure 115 The New File Dialog
3.
In the new .properties file, type the resource entries that you wish to add or override.
Figure 116 Sample Resource Entries
In this example, following is the new resource key:
The Table 15 lists the existing resource keys with their default values and their new values.
The merged common resources bundle now consists of the old resource keys with the new overridden values along with the new resource keys.
4.
a.
OR
Click the Project menu, and select Properties.
The Properties for project name dialog opens.
b.
In the left pane, click the Form Designer arrow to expand it, and select Common Properties.
Figure 117 The Project Properties Dialog
c.
Select the Enable project specific settings check box.
d.
Click the Browse button next to the Common Properties File.
The Pick Resource dialog opens.
Figure 118 The Pick Resource Dialog
e.
f.
Click Apply, and in the ensuing Rebuild? dialog, click Yes.
In the Properties view > Resources tab, the URI field shows that the common properties resource is now overridden.
a.
Click the Window menu, and select Preferences.
The Preferences dialog opens.
Figure 119 The Common Properties Preference Page
b.
Click the Form Designer arrow to expand it, and select Common Properties.
In the Project Specific Configuration dialog, selecting the project name opens the Preferences dialog for that project.
c.
Click the Browse button next to the Common Properties File.
The Pick Resource dialog opens as shown in Figure 118.
d.
e.
Click Apply, and in the ensuing Rebuild? dialog, click Yes.
Validations Related to Custom Common Resources
There are default validations available on custom common resources. They have following objectives:
If you see such validation messages, you may want to do one of the following:
Creating the missing common.properties file

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved