Siebel Tools Reference > Physical UI Navigation and Templates > Applet Templates >

Form Applets


A Form Applet can appear in any of the four major modes—Base, Edit, New, and Query. The following is an example of a Form Applet template for use in Edit, New, and Query modes. Applets to be used in Base mode are similar except that they do not contain the <swe:form> tag.

<swe:control id="1100">

<div class=CmdTxt>

<swe:this property="FormattedHtml" hintText="Outside Applet Help Text"/>

</div>

</swe:control>

<table class="AppletStyle1" width="100%" align="center">

<swe:form>

<tr>

<td colspan="2">

<swe:include file="CCTitle.swt"/>

</td>

</tr>

<tr>

<td>

<swe:error>

<swe:this property="FormattedHtml"/>

</swe:error>

</td>

</tr>

<swe:for-each startValue="1301" count="10" iteratorName="currentId">

<swe:control id="swe:currentId" hintMapType="FormItem">

<tr valign="top">

<td class="scLabelRight">&nbsp;

<swe:this property="RequiredIndicator"
hintText="Required"/>

<swe:this property="DisplayName" hintText="Label"/>

</td>

<td class="scField">

<swe:this property="FormattedHtml" hintText="Field"/>&nbsp;

</td>

</tr>

</swe:control>

</swe:for-each>

</swe:form>

</table>

The main tags that appear in this template are <swe:form>, <swe:control>, and <swe:error>.

In applications where the task activities are primarily data editing and input, you can forego read-only forms (Base mode) and use persistently editable forms. This type of form saves considerable time since data can be entered without first clicking an edit button and waiting for the form to appear in edit mode. An illustration of a persistently editable form applet appears in Figure 227.

Figure 227. Editable Form Applet

Click for full size image

If an applet is set to be in the Edit mode in a view (as specified by the mode property of the View Web Template Item), this applet is never shown in the Base mode. If you update the field values in this applet and commit the change, the applet continues to be shown in this mode after the changes are written to the database. You can, however, invoke a method like NewQuery or NewRecord on an applet that is shown in an Edit mode to show it in the Query or New modes. After executing the query or writing the new record, the applet is shown in the Edit mode.

To show a form applet in Edit mode in a view

  1. Update the control used to save the record so that it invokes the ExplicitWrite Record method.
  2. In a persistently editable form applet, use the ExplicitWriteRecord method (HTML Row Sensitive property set to TRUE) instead of WriteRecord.

  3. Map this control to the Applet Web Template of type Edit.
  4. For an applet that you are showing in the Edit mode in a view, you do not need to specify a Base type template, as the applet is never shown in the Base mode.

    Because the applet is being shown in the Edit mode by default in the view, you do not need the EditRecord, WriteRecord, or UndoRecord controls. You only need the ExplicitWriteRecord and ResetRecord controls.

  5. Map the applet to the view template in the Edit mode.
  6. In Siebel Tools, the View Web Template Item object type has a property called Applet Mode. This property is used to specify the mode to be used for the applet when rendering the view. The default value is Base. To make the form applet editable in the view, set the value of the Applet Mode property to Edit when mapping the applet in the View Web Template.


 Siebel Tools Reference, Version 7.5, Rev. A 
 Published: 18 April 2003