Siebel Developer's Reference > Tags >

swe:for-each-child, swe:child-applet


These two tags, in combination, support a new catalog-like layout for views with master-detail applets. Records from the master applet and the detail applet can be shown interwoven with each other, instead of the traditional layout where the records in the master applet are shown with the records in the detail applet below it.

To create this layout, the master and detail applets are configured as list applets. We will refer to the master applet as a root level applet. It is possible to show more than one set of master-detail relationships within a view (that is, there could be more than one root level applet). To define the relationship between the applets the new Position attribute of the View Web Template Item object type is used. The position attribute works similarly to the Position attribute of the Tree Node object type. The root level applets will have position values like 1, 2, and so on. For the applet with position 1, its immediate child applets will be assigned position values 1.1, 1.2, and so on. It is possible to define a third level applets with position 1.1.1, 1.1.2, and so on. (for example, these are the child applets of the applet with position 1.1).

In the View Web Template Item object definition, only the root level applets are mapped to <swe:applet> tags in the view template. The other applets in the view defined in the View Web Template Item object are not assigned an ID value. The layout of these nonroot applets are not specified in the view template, but instead in the applet template of the root level applets. The <swe:for-each-child> and <swe:child-applet> tags are used to specify this layout.

NOTE:  Siebel Systems currently supports only applets in the base mode in this layout.

Example

Suppose you have a master-detail view that includes the "Category Items List Applet" as the master applet and the "Sub Category Items List Applet" as the detail applet. The View Web Template Item of the view that contains this applet will have the following values:

New Identifier
Applet
Applet Mode
Position
101
Category Items List Applet
Base
1
 
Sub Category Items List Applet
Base
1.1

The base template for the Category Items List Applet will have the following table definition:

<table>

<swe:for-each-row>

<tr>

<td>

<swe:control id ="5001" /> </td><!-- field value like "Small Business" -->

<td>

<swe:for-each-child>

<swe:child-applet> <!-- Show the child applet -->

</swe:for-each-child>

</td>

</tr>

</swe:for-each-row>

</table>

The base template for the Sub Category Items List Applet will have the following table definition:

<table><tr>

<swe:for-each-row>

<td>

<swe:control id="5001"/> </td><!-- field value like "Desktop" -->

</swe:for-each-row>

</tr></table>

<swe:for-each-child>

Purpose

This tag will iterate over each of the child applets defined for this applet (based on the Position value in the View Web Template object of the view to which the applet belongs). This tag can be used only in the base template of an applet. If the applet does not have any child applets, this tag will be skipped.

Usage

<swe:for-each-child> ...... </swe:for-each-child>

<swe:child-applet>

Purpose

This tag is used to place the child applet within the parent applet. The base template of the child applet will be used to render the child applet at the point where this tag is placed.

Usage

<swe:child-applet/>

NOTE:  Set the "HTML Number of Rows" property of the Sub Category Items List Applet to the number of values you want to show under each category value.
To allow drilling down from the category and sub-category values, configure the appropriate drilldown objects.

The catalog style layout will force a view to be shown in standard interactivity mode and so these tags should not be used in high interactivity applications.


 Siebel Developer's Reference 
 Published: 23 October 2003