Configuring Siebel Business Applications > About Siebel Web Templates and Siebel Tags > About Applet Web Templates >

About Tree Applet Templates


This topic describes the tree applet template. For more information, see Customizing a Tree Applet.

How Siebel CRM Builds and Displays a Tree Applet

To display a tree, Siebel CRM iterates through each item of the tree in a top-down, depth-first fashion, and displays one item at a time. Siebel CRM defines this behavior in the swe:for-each-node tag.

Siebel CRM uses the swe:for-each-indent tag to indent each tree item. It uses this tag to do the following:

  • Place the text in the correct indent level relative to the root.
  • Display the expand icon, collapse icon, the text of the item, and the links.

Siebel CRM uses a series of GIF images to accomplish the indentation, or white spaces if in text-only mode. Siebel CRM uses images to display the expand icon and collapse icon, or text if in text-only mode. The swe:indent-img tag defines these objects. Siebel CRM displays, as part of the view, the list applet that is associated with the currently chosen tree node. For more information, see Customizing Icons in a Tree Applet.

Example Code of a Tree Applet Template

In this example, if the user clicks or expands a tree, then the swe:applet-tree-list tag provides a placeholder for a list applet that Siebel CRM displays. The applet that Siebel CRM renders depends on the node that is currently chosen.

The following is example code of a tree applet template:

  <!--View with tree applet on the left and list applet on the right-->

  <table border="0" cellspacing="0" cellpadding="1" width="100%">

<tr>

<!-- Begin Tree Applet -->

<td>

<swe:applet id="1" hintText="Tree Applet"/>

</td>

<!-- Begin List Applet -->

<td>

<swe:applet-tree-list/>

</td>

</tr>

  </table>

Example Code of a Tree Applet Template That Displays the Tree in a Single Column

In this example, Siebel CRM ignores the following items:

  • For tree items, ignores the swe:node tag that includes a DisplayName type
  • For tree nodes, ignores the swe:node tag that includes a FieldValue type

The following example code of a tree applet template displays the tree in a single column:

  <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>

<TBODY>

<swe:for-each-node>

<TR VALIGN=top>

<TD NOWRAP>

<swe:for-each-indent>

<swe:indent-img/>

</swe:for-each-indent>

<swe:node type="DisplayName">

<swe:this property="FormattedHtml"/>

</swe:node>

<swe:node type="FieldValue">

<swe:this property="FormattedHtml"/>

</swe:node>

</TD>

</TR>

</swe:for-each-node>

</TBODY>

  </TABLE>

Tags That Siebel CRM Includes in a Tree Applet Template

This topic describes important tags that Siebel CRM includes in a tree applet template.

SWE Tag That Displays Tree Nodes and Field Values

Siebel CRM uses the swe:for-each-node tag to display tree nodes and field values. It iterates through each visible item in the tree control in a top-down, depth-first fashion.

The attributes are optional. If the Count attribute is not defined, then the tag iterates over all nodes in the tree. The swe:for-each-node tag includes the following attributes:

  • Count. Specifies the number of times the tag iterates through content. If you require a specific tree format, then you use can use this attribute.
  • StartValue. The value at which the iteration starts. To start the iteration, the tag assigns this value to an internal iterator, and then increments it by one for each iteration.
SWE Tag That Indents Tree Items

Siebel CRM uses the swe:for-each-indent to indent tree items. It iterates through each level of a tree item. The swe:for-each-indent tag does not include any attributes.

SWE Tag That Provides a Placeholder for a GIF Image

Siebel CRM uses the swe:indent-img as a placeholder for a GIF image that corresponds to the indent level for the tree item that the user chooses in the Siebel client. At each level, the Siebel Web Engine uses in the swe:indent-img tag to determine which GIF file to use. The GIF image can include an empty space or a vertical bar. The swe:indent-img tag does not include any attributes.

SWE Tag That Provides a Placeholder for a Tree Item

Siebel CRM uses the swe:node as a placeholder for tree item. A tree item can be a repository tree node or a field value. Note the following:

  • If the tree item is a tree node, then Siebel CRM displays the display name.
  • If the tree item is not a tree node, then Siebel CRM generates a field value.

The expand icon, collapse icon, and links are parts of a tree item. Depending on the configuration file settings, Siebel CRM displays the expand icon or collapse icon as a GIF image or text. Siebel CRM only displays the expand icon or collapse for a tree item that contain child items. The following links are associated with each item:

  • A link for the expand icon and collapse icon that allows the user to expand or collapse the item
  • A link for the item image that allows the user to choose the item or to navigate to next or previous workset

Choosing an item allows the user to access the list applet that is associated with the tree node. The swe:node tag must use the swe:this tag as a child tag.

The swe:node tag includes the type attribute. This attribute can include the following values:

  • DisplayName. Displays the Display Name of the tree node.
  • FieldValue. Displays a field value.
Configuring Siebel Business Applications Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.