Creating or configuring forms > Configuring the <components> element > Configuring a multi-select list box

6.1.10 Configuring a multi-select list box

A multi-select list box component allows users to select one or more items in a list. The CTRL key is used to select multiple items. To use the multi-select list box, specify a <select-values> element with a cardinality attribute that has a value of "many".

To add/delete/modify a multi-select list box

  1. Open the appropriate XML file located in the Viewpoint home directory. Locate the <components> element.
  2. Create the <component> with a unique id.
  3. Insert the <select-values> element and set the cardinality attribute to "many".
  4. A <select-values> element with cardinality=”one” uses the (single select) List Box.

  5. Set the <default> element within <select-values> to specify what the initial selection should be.
  6. Set the <maximum> element within <select-values> to specify how many items must be selected at maximum.
  7. Set the <minimum> element within <select-values> to specify the minimum number of items that can be selected.
  8. Set the <select-value> element to specify what items should appear in the list that can be selected. Set the api-value to specify how the value is interpreted and display-value to determine what is displayed in the list.
  9. <select-values cardinality="many">
      <maximum>3</maximum>
      <minimum>2</minimum>
      <default api-value="RhelAS4u6x86" display-value="RedHat AS 4.6 32bit" />
      <default api-value="RhelAS4u6x86_64" display-value="RedHat AS 4.6 64bit" />
      <select-value api-value="RhelAS4u6x86" display-value="RedHat AS 4.6 32bit" />
      <select-value api-value="RhelAS4u6x86_64" display-value="RedHat AS 4.6 64bit" />
      <select-value api-value="RhelES5u1x86" display-value="RedHat ES 5.1 32bit" />"
      <select-value api-value="RhelES5u1x86_64" display-value="RedHat ES 5.1 64bit" />
      <select-value api-value="Win2003EEr2x86" display-value="Win 2003 Ent 32bit" />
      <select-value api-value="Win2003EEr2x86_64" display-value="Win 2003 Ent 64bit" />
    </select-values>

    The multi-select component is invalid when less than two or more than three items are selected.

Related topics