Siebel Developer's Reference > Siebel Web Engine 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 catalog-like layout, the master and detail applets are configured as list applets. The master applet is referred to 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 have position values like 1, 2, and so on. For the applet with position 1, its immediate child applets are assigned position values 1.1, 1.2, and so on. It is possible to define a third-level applet 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:  Only applets in the base mode are currently supported 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 object definitions for this view are listed in the following table:

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 has 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 has 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

This tag iterates 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 is skipped.

Usage

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

swe:child-applet

This tag is used to place the child applet within the parent applet. The base template of the child applet is 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 subcategory values, configure the appropriate drilldown objects.

The catalog style layout forces a view to be shown in standard interactivity mode, so do not use these tags in high interactivity applications.

Siebel Developer's Reference Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.