ProcessRecord

Top  Previous  Next

A ProcessRecord element represents an input record on the user interface and it is a container for the Process Field elements. It must be placed into a ProcessBlock Element.

  <tr mo:type="ProcessRecord">

     <td>

       <input type="hidden" name="px_recstat"/>
        ..

     </td>

  </tr>

Repeating a Process Record

XSL function xsl:for-each is used to repeat a ProcessRecord as follows.

  <table mo:type="ProcessBlock" mo:name="Products">

    <xsl:for-each select="/root/products/item">

      <tr mo:type="ProcessRecord">

        <td>

          <input name="__selection" type="checkbox" value="checked" 
                 onclick="PMgr.toggleSelection(this);"/>

          <input type="hidden" name="px_recstat"/>

          <input name="pf_NAME" type="text" 
                 onchange="PMgr.fieldChanged(this);" value="{NAME}"

                 mo:type="EditBox" mo:field="true" mo:name="NAME" mo:iValue="{NAME}"/>

          ...   

        </td>

      </tr>

    </xsl:for-each>

  </table>

The products in <xsl:for-each select="/root/products/item"> definition is the name of a dataRequest configuration element. Since the definition encloses the ProcessRecord definition code block, the definition code block is repeated for each /root/products/item node existing in the Page XML Data.

The Selection Box

To give the users possibility to select one or more records before submitting the ProcessForm, a Selection Box must be provided inside the ProcessRecord elements using the following code.

<input name="__selection" type="checkbox" value="checked" 
       onclick="PMgr.toggleSelection(this);"/>

The Record Status Field

Additionally, there must be a hidden input element in the ProcessRecord to keep the status information about the enclosing record.

<input type="hidden" name="px_recstat"/>

Using the information provided by this field  the Process Manager knows if the record is selected and/or modified and even the names of the fields that were modified by the user.

To access the information provided by this field _selected, _modified symbols and ismodified() function can be used in MScript codes.

Process Fields

A ProcessRecord may contain 0 or more Process Fields. There are many different types of Process Fields such as EditBox, ComboBox, HiddenBox, DateDialog, SuggestBox, etc. A Process Field wraps one or more HTML element and acts one single user control. If an HTML element has mo:field="true" definition then it is a Process Field element.

In the example above the <input name="pf_NAME" type="text" .../> definition belongs to a Process Field.