Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
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">
<swe:this property="RequiredIndicator"
hintText="Required"/><swe:this property="DisplayName" hintText="Label"/>
</td>
<td class="scField">
<swe:this property="FormattedHtml" hintText="Field"/>
</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>
.
<swe:form>
The
<swe:form>
tag is analogous to a an HTML<form>
tag and encloses a section of a page that accepts user input. The main attributes of this tag are htmlAttr and Name, both of which are optional.The values of the htmlAttr should be valid attributes of the HTML
<form>
tag other than method, name, and action. These attributes will be used as is with the HTML<form>
tag that is generated. The name attribute creates an HTML form with the specified name. If this attribute is not specified, an internally generated name is used.<swe:control>
The
<swe:control>
tag specifies placeholders for controls. The main attributes of this tag are id, which maps the control to the placeholder, and the property, which specifies the property of the control to be rendered. The values for the property attribute that are germane to form applets include FormattedHTML, DisplayName, and RequiredIndicator.The FormattedHTML property causes the data value of the control to be rendered, while the DisplayName corresponds to the Caption property. The RequiredIndicator results in specific HTML being rendered if the underlying Business Component Field is required.
<swe:error>
When a server side error occurs on submitting a form, the same page will be shown again with the error message displayed within the page. The
<swe:error>
tag denotes the location of this error message. The only attribute of the tag is a property whose value must be FormattedHtml. This results in the contents of the error message to be displayed. If when the form is rendered there are no errors, the contents of the<swe:error>
tag are skipped.NOTE: For errors that occur outside of a form submission, the application's Error Page will be used.
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.
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
- Update the control used to save the record so that it invokes the ExplicitWrite Record method.
In a persistently editable form applet, use the ExplicitWriteRecord method (HTML Row Sensitive property set to TRUE) instead of WriteRecord.
- Map this control to the Applet Web Template of type Edit.
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.
- Map the applet to the view template in the Edit mode.
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.
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Tools Reference, Version 7.5, Rev. A Published: 18 April 2003 |