Although you created a field in the procedure 5.1 Adding a field (custom extension attribute) to Profiles
, the field label does not appear correctly. Labels for these fields in the user interface are stored separately in application property files. You configure the label by adding a reference to the file in the application-specific configuration file and adding the label to a custom property file in the customization directory. The property file is often referred to as a resource bundle
Before you begin
Add the contractAgency field to the Profiles application. For more information, see 5.1 Adding a field (custom extension attribute) to Profiles
- Check out the configuration files.
The general process of checking out and checking in configuration files is described in 1.4 Publishing customizations with the wsadmin tool.
Adapt the following example commands for your system:
wsadmin -lang jython -user wasmgr -password d3moL0tus
ProfilesConfigService.checkOutConfig("f:/temp", AdminControl.getCell() )
Remember to leave the wsadmin session open to check in the file in a later step.
- Add the attribute in the Profiles configuration file.
- Navigate to the temporary location where you checked out the profiles-config.xml file.
- Open the profiles-config.xml file with a text editor.
- Find the <Contact information> tag in the layout section.
- Add this line below the line containing the courtesyTitle label.
The following figure shows how the new attribute should appear.
- Save the profiles-config.xml file.
- Add the resource bundle to the IBM Connections configuration file.
- Navigate to the temporary location where you checked out the IBM Connections configuration file.
- Open the LotusConnections-config.xml file with a text editor
- Find the <resources> tag at the end of the file.
- Add the following code:
<widgetBundle name="label.custom.resources" prefix="custom" />
- Save the LotusConnections-config.xml file.
Tip: To improve performance, use as few resource bundles as possible. Use one customized file for all your new keys.
- Check in the two configuration files. For more information about checking in configuration files, see 1.4 Publishing customizations with the wsadmin tool.
Add the contractAgency string to the customization directory.
- Check in the profiles-config.xml file using this wsadmin client command:
- Check in the LotusConnections-config.xml file.
- Create a file and save it with the file name label.custom.resources.properties in the strings customization directory <customizationDir\strings>. For information about the location of the customization directory, see 1.2 IBM Connections customization variables.
- Open the label.custom.resources.properties file with a text editor and add this key-value pair on its own line:
- Optional: create language-specific versions of the file to display the string in other languages. For example,
Test the new attribute.
- label.custom.resources_fr.properties for string values in French
- label.custom.resources_es.properties for string values in Spanish
For more information about localization, see 2.2 Customizing product strings.
- Use the WebSphere Application Server Integrated Solutions Console to stop and restart the server hosting the Profiles application.
- Clear your browser cache.
- Navigate to your profile in IBM Connections. Your new attribute, "Contract Agency," should appear in the Contact Information tab, as in this example:
You have now finished adding an attribute and specifying a label for it. You can add unlimited attributes to profiles, however, too many will render profiles unusable. Having added the attribute to Profiles, you may want to consider how the attribute will be populated. Refer to 5.3 Populating custom extension attributes
for how to populate attributes.
- Modify a label: In this procedure you created an attribute. You can use a similar process to modify the label on an existing attribute. For example, you might change the default label "Mobile Number" to "Cell Phone." For more information about modifying labels, see 2.2 Customizing product strings.
- Retrieve, update, or delete the attribute using the Profiles API. For more information, see 5.3 Populating custom extension attributes.
- Add profile types to customize the layout of the main Profiles page and the layout of the widgets used in Profiles. For more information, see5.6 Adding profile types.
Parent topic: 5.0 Customizing Profiles