Sun Identity Manager Deployment Reference

Creating a Multiselection List

The <MultiSelect> component displays a multiselection list box. This textbox displays as a two-part object in which a defined set of values in one box can be moved to a selected box. Values for the list box can be supplied by allowedValues elements or obtained dynamically through a method call, such as getResources.

Along with the <Select> component, the <MultiSelect> component can dynamically provide a list of items from which to select. These lists are populated by specifying choices within a property called allowedValues or by obtaining values dynamically through a method call to the resource. For information on populating lists within a multiselection entry box, see the section titled Populating Lists.

<Field name=’waveset.roles’>
   <Display class=’MultiSelect’ action=’true’>
      <Property name=’title’ value=’Roles’/>
      <Property name=’availableTitle’ value=’Available Roles’/>
      <Property name=’selectedTitle’ value=’Current Roles’/>
      <Property name=’allowedValues’>
            <invoke name=’getObjectNames’ class=’com.waveset.ui.FormUtil’>


Alternative Display Values in a Select List

You can create a Select list that displays a different set of values than the values that will actually be assigned to the field. This is often used to provide more recognizable names for cryptic values, or to perform internationalization. This is accomplished by using the valueMap property to associate the displayed value with the actual value, as shown in the following example:

Example 2–11 Changing Values for Select Lists Using the valueMap property

<Field name=’waveset.organization’>
<Display class=’Select’>
<Property name=’title’ value=’Add Account’/>
<Property name=’nullLabel’ value=’Select...’/>
<Property name=’valueMap’>
<s>Top Level</s>
<s>Ted’s Organization</s>
<s>Super Secret Org</s>

In the preceding example, the value map is specified as a list of pairs of strings. The odd-numbered strings are the actual values that are assigned to this field. The even-numbered strings are the values that are displayed in the select list. For example, if the select list entry Ted’s Organization is selected, the value of this field becomes Top:Orgb.