cell

With some limitations, the cell item can be used instead of <xforms:select1> or <xforms:select> to populate combobox, list and popup items

A cell can belong to multiple comboboxes, lists and popups, based on having a common <group> option setting.

Cells fall into two categories according to their behavior:

Available options

activated, active, data, datagroup, enclosuresettings (action cell of type enclose only), group, label, itemnext, itemprevious, printsettings, saveformat, transmitdatagroups, transmitformat, transmitgroups, transmititemrefs, transmititems, transmitnamespaces, transmitoptionrefs, transmitoptions, transmitpagerefs, type, url, value

Examples

This example shows a popup that contains a list of action cells. When the user activates the popup and selects one of the actions, the action is performed. In the example, the available actions are to save the form, to close the form, or to print the form.

  <popup sid="Gender">
    <label>Select an action</label>
    <group>action_list</group>
  </popup>

  <cell sid="saveform_cell">
    <value>Save this form</value>
    <type>saveform</type>
    <group>action_list</group>
  </cell>
  <cell sid="cancel_cell">
    <value>Close this form</value>
    <type>cancel</type>
    <group>action_list</group>
  </cell>
  <cell sid="print_cell">
    <value>Print this form</value>
    <type>print</type>
    <group>action_list</group>
  </cell>

This example shows a popup that displays the text Select a gender. After the user makes a selection, the popup displays either Male or Female, depending on the selection made by the user.

 <popup sid="Gender">
    <label>Select a gender</label>
    <group>gender_list</group>
  </popup>

  <cell sid="male_cell">
    <label>Male</label>
    <value>M</value>
    <group>gender_list</group>
  </cell>
  <cell sid="female_cell">
    <label>Female</label>
    <value>F</value>
    <group>gender_list</group>
  </cell>

Usage details

  1. Use the type option to establish the behavior of a cell. The default type is select.
  2. Cells can have both <value> and <label> options. These options affect the form differently depending on whether the cell is linked to a combobox, a popup, or a list item. In general, the <label> of the cell is displayed as a choice, and the <value> of the cell is displayed if that cell is selected.
  3. Cells take their color and font information from the combobox, list and popup items with which they are associated. In this way, a cell's appearance can vary according to the list that the user is viewing.
  4. To get the <value> text of a cell of type select that a user has chosen from a list, dereference it in the following manner:
     page_tag.list_tag.value->value
    

    Similarly, to obtain the <label> of the chosen cell of type select:

    page_tag.list_tag.value->label

    Similarly, to obtain the sid of the chosen cell of type select:

    page_tag.list_tag.value

    For example:

    compute="PAGE1.Gender.value->value"
    compute="PAGE1.Gender.value->label"
    compute="PAGE1.Gender.value"
  5. Starting with XFDL version 4.5, items of type cell are the only items that can be filtered using the XFDL <signgroups> and <transmitgroups> options.