Sun Identity Manager Deployment Reference

Adding a Calendar Icon to a Form

You can add a calendar icon to a page with the DatePicker element. The user can click this icon to select a calendar date and populate a page field. For example, the Identity Manager Create Audit Report page uses this component to select start and end dates.

The DatePicker element returns a date object. Most resource attributes that you set using DatePicker require a date in the form of a string. The extra text field performs the conversion of the new date object into a string or displays the current setting.

You can obtain the date in one of several formats by passing a different format string to the invoke dateToString method as indicated in the following table.

Table 2–14 Expiration Date Formats

Expiration Date Field 








 <Field name=’aix_account_expire’>
    <Display class=’DatePicker’>
      <Property name=’title’ value=’Set Password Expiration Date’/>

The field defined below displays the password expiration date as found in the /etc/security/user file. It also displays any new date selected by the aix_account_expire field if the refresh or recalculate is performed after selecting a new date. Identity Manager looks to see if the aix_account_expire date field has been set (not null) from the DatePicker field.

If this date field has been set, Identity Manager calls an invoke method to convert the date object into a string in the specified format: MMddHHmmyy.

Otherwise, display the current date as set on the AIX OS: accounts[AIX].aix_expires.

<Field name=’accounts[AIX].aix_expires’>
    <Display class=’Text’>
       <Property name=’title’ value=’Current Password Expiration Date’/>
       <Property name=’noNewRow’ value=’true’/>
       <Property name=’readOnly’ value=’true’/>
       <Property name=’size’ value=’10’/>
         <invoke name=’dateToString’ class=’com.waveset.util.Util’>
       <!-- First argument to dateToString method is a date object -->
       <!-- Second argument is the format you want the converted date/string in -->