Sun Identity Manager Deployment Reference

Basic Components

BackLink

Displays a link that returns to the previous page. The behavior of this component is the same as that of the browser Back button. However, you may want to place this link in a convenient position on the page.

Properties for this display component:

Example

<Field name=’back’>
   <Display class=’BackLink’>
      <Property name=’value’ value=’previous page’/>
   </Display>
</Field>

Button

Displays a button. Buttons typically submit the surrounding form, but they can also be defined to run arbitrary JavaScript.

Properties for this display component are:

Example

<Display class =’Button’>
   <Property name =’label’ value =’Change Password’/>
   <Property name =’value’ value =’Recalculate’/>
</Display>

Checkbox

Displays a checkbox. When selected, the box represents a value of true. An unselected box represents a false value.

Properties for this display component are:

Example

<Field name=’accounts[AD].passwordExpired’>
   <Display class=’Checkbox’>
      <Property name=’title ’value=’Password is Expired’/>
   </Display>
</Field>

DatePicker

Allows the user to specify a date using a pop-up window that displays a calendar. Identity Manager displays the field in the form as a calendar icon. When a user clicks on the icon, Identity Manager opens the calendar in a separate pop-up window.

This component allows a user to enter a date value. Depending on how you set the component properties, the user can enter a date value using select menus, a text field, or a calendar pop-up window. By default, the component renders with a text field and an icon that you click to bring up the calendar pop-up.

Properties include:

Example


<Field name=’ExpireDate’>
   <Display class=’DatePicker’>
      <Property name=’title’ value=’Set Password Expire  date’/>
      <Property name=’format’= value=’iso’/>
   </Display>
</Field>

FileUpload

Displays a text field and a Browse button that allows the user to select a file and upload it to the server. Use this component to import data into Identity Manager from a file (such as users or configuration objects). This component supports all the properties that the Text component supports.

Html

Allows you to insert arbitrary HTML markup into a form field or other component contained within an HTML page, including JavaScript.

This component contains one property: html, which allows you to specify the string(s) that are rendered into the page.

Example

<Display class=’Html’>
   <Property name=’html’>
       <concat>
         <s><![CDATA[<div class="DashAlrtMsgTxt">]]></s>
         <ref>loginWarning</ref>
         <s><![CDATA[&nbsp;<a href=’]]></s>
         <s>user/changePassword.jsp</s>
         <s><![CDATA[’>]]></s>
         <message name=’UI_USER_MAIN_CLICK_HERE_INTRO’/>
         <s><![CDATA[</a>]]></s>
         <message name=’UI_USER_MAIN_CLICK_HERE_REMAINDER’/>
         <s><![CDATA[</div>]]></s>
       </concat>
   </Property>
</Display>
 

HtmlPage

Describes the root HTML page. This component can contain arbitrary HTML and browser JavaScript. Properties include:

InlineAlert

Displays an error, warning, success, or informative alert box. This component is typically located at the top of a page. You can display multiple alerts in a single alert box by defining child components of type InlineAlert$AlertItem.

Properties for this display component include:

Example of Single Alert Message


<Field>
   <Display class=’InlineAlert’>
      <Property name=’alertType’ value=’warning’/>
      <Property name=’header’ value=’Data not Saved’/>
      <Property name=’value’ value=’The data entered is not yet saved. Please click 
                                    Save to save the information.’/>
   </Display>
</Field>

Example of Multiple Alert Messages

Define alertType only within the InlineAlert property. You can define other properties in the InlineAlert$AlertItems.


<Field>
   <Display class=’InlineAlert’>
      <Property name=’alertType’ value=’error’/>
   </Display>
   <Field>
     <Display class=’InlineAlert$AlertItem’>
        <Property name=’header’ value=’Server Unreachable’/>
        <Property name=’value’ value=’The specified server could not be contacted. 
                                      Please view the logs for more information.’/>
        <Property name=’linkURL’ value=’viewLogs.jsp’/>
        <Property name=’linkText’ value=’View logs’/>
        <Property name=’linkTitle’ value=’Open a new window with the server logs’/>
     </Display>
  </Field>
  <Field>
     <Display class=’InlineAlert$AlertItem’>
        <Property name=’header’ value=’Invalid IP Address’/>
        <Property name=’value’ value=’The IP address entered is in an invalid subnet. 
                                      Please use the 192.168.0.x subnet.’/>
      </Display>
  </Field>
</Field>

Javascript

Use to insert pre-formatted JavaScript into the page. This is useful if you are using the onClick or onChange properties in components and want to call custom JavaScript functions.

Though not required, consider specifying the name property when building components from XML forms. Using features such as field loops and field inclusion, you can add more than one JavaScript component containing the same script to the page. During HTML generation, JavaScript components that have the same name are included only once.

Example

<Display class=’Javascript’>
   <Property name=’script’>
      <String>
         function setTextFromSelect(sel, textFieldName) {
         if ( sel == null || sel.inchange ) return;
         sel.inchange = true;
         var textField = sel.form.elements[textFieldName];
         if ( textField == null ) return;
         textField.value = sel.value;
         sel.selectedIndex = 0;
         sel.inchange = false;
         }  // setTextFromSelect(sel, textFieldName)
      </String>
   </Property>
   <Property name=’noNewRow’ value=’true’/>
</Display>

The component has an extended property named script that can contain the JavaScript text.

Label

Displays a string of text.

Properties for this display component are:


Note –

If no padding is specified, the default padding is leftPad=2, rightPad=2.


<Field>
   <Display class=’Label’>
      <Property name=’title’ value=’Account ID’/>
      <Property name=’value’>
         <ref>waveset.accountId,/ref>
      </Property>
   </Display>
</Field>
 

Link

Places a link on the page.

Properties include:

Example

<Field>
   <Display class=’Link’>
      <Property name=’name’ value=’Request
            Group Access’/>
      <Property name=’URL’
         value=’user/processLaunch.jsp?newView=true’>
      <Property name=’id’ value=’Group Request
            Process’/>
   </Display>
</Field>
 

Note –

Link components are one place in your form where you might use a <map> element to pass name/value pairs. In the following example, the <map> element contains several pairs: a mapping of a String to a Boolean value and a String to a List.


<invoke class=’com.waveset.ui.FormUtil’
name=’getOrganizationsDisplayNames’>
   <ref>:display.session</ref>
     <map>
       <s>filterVirtual</s>
       <o><Boolean>true</Boolean></o>
       <s>current</s>
       <list>
         <ref>original.orgParentName</ref>
       </list>
       <s>excluded</s>
       <list><ref>orgName</ref></list>
     </map>
</invoke>

LinkForm

Renders a bulleted list of links, resembling a menu.

ListEditor

Renders an editable list of strings.

Properties

Properties include:

Example

The following example shows a field that uses the ListEditor display class (Tabbed User Form):

<Field name=’accounts[Sim1].Group’>
     <Display class=’ListEditor’ action=’true’>
        <Property name=’listTitle’ value=’stuff’/>
        <Property name=’allowTextEntry’>
            <Boolean>true</Boolean>
        </Property>
        <Property name=’ordered’>
            <Boolean>true</Boolean>
        </Property>
     </Display>
     <Expansion>
         <ref>accounts[Sim1].Group</ref>
     </Expansion>
</Field>

This code snippet creates a field where the customer can add groups to or remove them from a user.


Note –

This display class typically requires a List of Strings as input. To coerce a single String into a List of Strings:

<Expansion>
   <appendAll><ref>accounts[Sim1].Group</ref></appendAll>
</Expansion>

NameValueTable

A component that renders a collection of name/value pairs in a simple two column table. This component directly renders the data it contains.

Data can be specified in several forms:

Properties include _hideEmptyRows, which when set to true, hides rows for which no value exists.

MultiSelect

Displays a multiselection text box, which displays as a two-part object in which a defined set of values in one box can be moved to a selected box. Values in the left box are defined by the allowedValues property, values are often obtained dynamically by calling a Java method such as FormUtil.getResources. The values displayed in the right side of a multiselection box are populated from the current value of the associated view attribute, which is identified through the field name.

The form titles for this two-part object are set through the availabletitle and selectedtitle properties.

If you want a MultiSelect component that does not use an applet, set the noApplet property to true.

See Alternative to the MultiSelect Component for a related discussion.


Note –

If you are running Identity Manager on a system running the Safari browser, you must customize all forms containing MultiSelect components to set the noApplet option. Set this option as follows:

<Display class=’MultiSelect’>
      <Property name=’noApplet’ value=’true’/>
 ...

Properties for this display component are:


Example

<Field name=’accounts[LDAP].LDAPDept’ type=’string’>
   <Display class=’MultiSelect’ action=’true’>
      <Property name=’title’ value=’LDAP Department’/>
   </Display>
   <Constraints>
      <o>
         <List>
             <String>Sales</String>
             <String>Marketing</String>
             <String>International Sales</String>
      </List>
      </o>
   </Constraints>
</Field>

Radio

Displays a horizontal list of one or more radio buttons. A user can select only one radio button at a time. If the component value is null or does not match any of the allowed values, no button is selected.

Properties for this display component are:

Example

<Field name=’attributes.accountLockExpiry.unit’>
   <Display class=’Radio’>
     <Property name=’noNewRow’ value=’true’/>
     <Property name=’labels’>
        <List>
           <String>UI_TASKS_XML_SCHED_MINUTES</String>
           <String>UI_TASKS_XML_SCHED_HOURS</String>
           <String>UI_TASKS_XML_SCHED_DAYS</String>
           <String>UI_TASKS_XML_SCHED_WEEKS</String>
           <String>UI_TASKS_XML_SCHED_MONTHS</String>
        </List>
     </Property>
     <Property name=’allowedValues’>
        <List>
           <String>minutes</String>
           <String>hours</String>
           <String>days</String>
           <String>weeks</String>
           <String>months</String>
        </List>
     </Property>
   </Display>
</Field>

SectionHead

Displays a new section heading defined by the value of the text property. It is an extension of the Label class that sets the font property to a style that results in large bold text. It also sets the pad property to zero to eliminate the default 2 space padding. Use it to break up long forms into sections separated by a prominent label.

The only property for this display component is text, which specifies the text to be displayed.

Example

<Field>
   <Display class=’SectionHead’>
      <Property name=’text’ value =’Calculated Fields’/>
   </Display>
</Field>

Select

Displays a single-selection list box. Values for the list box must be supplied by the allowedValues property.

Properties for this display component are:

The component supports the command and onChange properties.

Example

<Field name=’city’ type=’string’>
   <Display class=’Select’>
      <Property name=’title’ value=’City’/>
      <Property name=’allowedValues’>
         <List>
            <String>Austin</String>
            <String>Portland</String>
            <String>New York</String>
         </List>
      </Property>
   </Display>
</Field>

Text

Displays a regular text entry box.

Common properties for this display component are:

Example


<Field name=’variables.identityID’>
   <Display class=’Text’>
      <Property name=’required’>
         <Boolean>true</Boolean>
      </Property>
      <Property name=’title’ value=’Identity ID’/>
      <Property name=’size’ value=’32’/>
      <Property name=’maxLength’ value=’128’/>
      <Property name=’submitOnEnter’ value=’Save’/>
   </Display>
</Field>

TextArea

Displays a multi-line text entry box.

Properties for this display component are:

Example

To display a text box with five visible rows that wraps after each 70 characters specify:

<Field name=’Description’>
   <Display class=’TextArea’>
     <Property name=’rows’ value=’5’/>
     <Property name=’columns’ value=’70’/>
   </Display>
</Field>

If the user enters text beyond the defined visible rows, the text area displays a scroll bar.

Alternative to the MultiSelect Component

It can be unwieldy to display many admin roles using the MultiSelect component (either the applet or HTML version). Identity Manager provides a more scalable way of displaying and managing admin roles: the objectSelector field template.

The Scalable Selection Library (in sample/formlib.xml) includes an example of using an objectSelector field template to search for admin role names that a user can select.


Example 7–2 Example of objectSelector Field Template


<Field name=’scalableWaveset.adminRoles’> 
   <FieldRef name=’objectSelector’> 
      <Property name=’selectorTitle’ value=’_FM_ADMIN_ROLES’/> 
      <Property name=’selectorFieldName’ value=’waveset.adminRoles’/> 
      <Property name=’selectorObjectType’ value=’AdminRole’/> 
      <Property name=’selectorMultiValued’ value=’true’/> 
      <Property name=’selectorAllowManualEntry’ value=’true’/> 
      <Property name=’selectorFixedConditions’> 
         <appendAll> 
            <new class=’com.waveset.object.AttributeCondition’> 
               <s>hidden</s> 
               <s>notEquals</s> 
               <s>true</s> 
            </new> 
            <map> 
               <s>onlyAssignedToCurrentSubject</s> 
               <Boolean>true</Boolean> 
            </map> 
         </appendAll> 
      </Property> 
      <Property name=’selectorFixedInclusions’> 
         <appendAll> 
            <ref>waveset.original.adminRoles</ref> 
         </appendAll> 
      </Property> 
   </FieldRef> 
</Field>

ProcedureHow to Use the objectSelector Example Code

  1. From the Identity Manager IDE, open the Administrator Library UserForm object.

  2. Add the following code to this form:


    <Include>
       <ObjectRef type=’UserForm’ name=’Scalable Selection Library’/>
    </Include>
  3. Select the accounts[Lighthouse].adminRoles field within the AdministratorFields field.

  4. Replace the entire accounts[Lighthouse].adminRoles with the following reference:

    <FieldRef name=scalableWaveset.adminRoles/>

  5. Save the object.

    When you subsequently edit a user and select the Security tab, Identity Manager displays the customized form. Clicking... opens the Selector component and exposes a search field. Use this field to search for admin roles that begin with a text string and set the value of the field to one or more values.

    To restore the form, import $WSHOME/sample/formlib.xml from Configure > Import Exchange File.

    See the Scalable Selection Library in sample/formlib.xml for other examples of using the objectSelector template to manage resources and roles in environments with many objects.