ShowTable of Contents
Previous |
Next
You can customize Profiles search to allow the extension attributes to be available on the search form. You can also remove attributes from the search for that are not relevant to your organization.
Configuring Profiles directory search options
In our scenario, we add the Job Category attribute to the search form.
Before you begin
Procedure
- Check out the profiles-config.xml file.
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:
cd e:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin
wsadmin -lang jython -user wasmgr -password d3moL0tus
execfile("profilesAdmin.py")
ProfilesConfigService.checkOutConfig("f:/temp", AdminControl.getCell() )
Remember to leave the wsadmin session open to check in the file in a later step.
- Open the profiles-config.xml file in a text editor.
Find the <searchLayout> section.
Add the following line:
<extensionAttribute showLabel="true" labelKey="label.custom.jobCategory" bundleIdRef="custom" extensionIdRef="jobCategory" />
- Save and close the file.
- Check in the profiles-config.xml file.
In the same wsadmin session check in the profiles config file using the following command:
ProfilesConfigService.checkInConfig()
- Restart the Profiles application.
- Test the search form in a browser.
A successful customization shows results similar to this:

Next steps
After placing the extension attribute on the Search form, it makes sense to add the field to the Search results page. The procedure follows below.
Tip
In the Contract Agency example, we have an attribute that is not common to all users. It might be useful to allow API searches on the attribute without allowing interactive searches on the Search form. This can be accomplished using the hideOnSearchUIForm="true" syntax as shown in the following example
<extensionAttribute hideOnSearchUIForm="true" extensionIdRef="contractAgency" />
The Search layout is common for all profile types - because we are just embarking on a search the profile type is unknown. Contrast this with the SearchResults layout where the Profile Type is known on the results.
Customizing directory search results
You can customize Profiles search results to show extension attributes. You can also remove attributes from the search results layout that are not relevant to your organization.
In our scenario, it would be useful to add the Contract Agency to the search results where it exists.
Before you begin
Procedure
- Check out the profiles-config.xml file.
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:
cd e:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin
wsadmin -lang jython -user wasmgr -password d3moL0tus
execfile("profilesAdmin.py")
ProfilesConfigService.checkOutConfig("f:/temp", AdminControl.getCell() )
Remember to leave the wsadmin session open to check in the file in a later step.
- Open the profiles-config.xml file in a text editor.
Find the <searchResultsLayout profileType="default"> section.
Duplicate the section for the profileType="Contractor".
- Add the following line to the section for the Contractor profileType. Adding it to the third Column section under groupwareEmail:
<extensionAttribute showLabel="true" hideIfEmpty="true" labelKey="label.custom.jobCategory" bundleIdRef="custom" extensionIdRef="contractAgency" />
- Save and close the file.
- Check in the profiles-config.xml file.
In the same wsadmin session check in the profiles configuration file using the following command:
ProfilesConfigService.checkInConfig()
- Restart the Profiles application.
- Test the search results form in a browser. A successful customization shows results similar to this:

Tip
Using hideIfEmpty="true" is useful for all attributes on the SearchResults layout as it saves screen space on a long list.
Customizing settings for the search type-ahead
Connections has a number of parameters for configuring the search type-ahead for Names.
The parameters are easy to configure and are
described in the product Infocenter.
The factors that would cause you to modify the parameters are:
- You have a large number of users and the type ahead returns too many results after only a few key presses.
- Many of the users are remote and the type-ahead is slow to respond over the network.
- You have very good server performance and network and would like to offer users the option to see Business Cards and Thumbnails.
The correct values for these settings will vary for each organization and trial and error is the best determinant of the values.
Parent topic:
5.0 Customizing Profiles