Sun Identity Manager Deployment Reference

Buttons

To create a typical push button, use the <Button> component.

To align multiple buttons in a horizontal row, use the <ButtonRow> component.

<Field>
   <Display class=’Button’>
      <Property name=’location’ value=’true’/>
      <Property name=’label’ value=’Cancel’/>
      <Property name=’command’ value=’Cancel’/>
   </Display>
</Field>

To position the button in a button row, include the following code in your button definition: <Property name=’location ’ value=’ button ’/>. If you do not set this Property field, the button will appear in the form in the order in which you include it in the form.

Assigning or Changing a Button Label

When defining a button, its label is identified by the value setting in the label property as indicated below.

<Display class=’Button’>
   <Property name=’label’ value=’Cancel’/>

The browser displays the preceding code as a button labeled Cancel.

Overwriting Default Button Names

Two buttons typically are displayed at the bottom of Identity Manager forms. By default, the buttons are labeled Save and Cancel.

ProcedureTo Change Default Button Names

  1. On the line that defines the form name (in the header), change the name field


    <Form name=’Anonymous User Menu’>
    
       to
    
    <Form name=’Anonymous User Menu’ noDefaultButtons=true>

    At the bottom of the form, add the following fields for the Save and Cancel buttons, and change the labels as desired:


    <Field>
       <Display class=’Button’>
          <Property name=’label’ value=’Submit’/>
          <Property name=’name’ value=’submitButton’/>
          <Property name=’value’ value=’true’/>
          <Property name=’command’ value=’Save’/>
       </Display>
    </Field>
    <Field>
       <Display class=’Button’>
          <Property name=’label’ value=’Cancel’/>
          <Property name=’command’ value=’Cancel’/>
          <Property name=’location’ value=’true’/>
       </Display>
    </Field>

Command Values and Buttons


Note –

This section is important only if you are building Button objects. If you are building components from XML forms, you can assume that the values in the following table are recognized.


All pages in the Identity Manager interfaces have used the post data parameter named command as a mechanism to convey which form submission button was pressed. Page processing systems using components are not required to follow the same convention, but there are some components that contain special support for the command parameter, in particular the Button component.

Some page processing systems, notably the one that processes XML forms, expect the command parameter to be used. Further, several command parameter values have been used to indicate particular actions. These values are described in the following table.

Table 2–11 Possible Values for the command Parameter

Parameter  

Description  

Save 

Indicates that the contents of the form should be saved. 

Cancel 

Indicates that contents of the form should be thrown away. 

Recalculate 

Indicates that the form should be refreshed based on entered data. 

Any value can be used for the command parameter, but you must know which unrecognized command value usually results in a redisplay of the page.

Aligning Buttons with <ButtonRow> Element

To align multiple buttons in a row, use the ButtonRow element.


<Field name=’OrganizeButtons’>
   <Display class=’ButtonRow’>
      <Property name=’title’ value=’Choose a Button’/>
   </Display>
<Field name=’ChangePassword’>
   <Display class=’Button’>
      <Property name=’label’ value=’Change Password’/>
      <Property name=’value’ value=’Recalculate’/>
   </Display>
</Field>
<Field name=’ResetPassword’>
   <Display class=’Button’>
      <Property name=’label’ value=’Reset Password’/>
      <Property name=’value’ value=’Recalculate’/>
   </Display>
</Field>