Configuring Siebel eBusiness Applications > Overview of Web Templates and Siebel Tags > About Using Toolbars and Menus in Templates >

How Menus are Displayed in Templates


A menu, in SWE templates, is a button or link that activates a drop-down list of menu selection items when clicked by the user. There are application-level and applet-level menu buttons/links. The <swe:menu> tag will render all menus that are appropriate at the template level where it occurs— application (container page) or applet. Menus are shown only when running in the High Interactive mode. An applet menu is rendered as an icon button, generally placed to the left of the other buttons such as Edit and Delete. At run time, the set of menu options for a given applet are generated from the .srf file. Note that for applet level menus, the tag must be specified in an applet template.

A sample of the template for rendering an applet's buttons, including the menu button, appears below (from CCFormButtons.swt):

<!-- Buttons (Edit, Delete, Optional, Optional, Optional) --->

<!-- Menu,179 -->

<td valign="middle" nowrap>

<swe:menu/>

</td>

<td valign="middle"><img src="images/bttns/div.gif" height="13" border="0" align="middle" alt=""></td>

<!-- EditRecord -->

<swe:control id="132">

<td valign="middle" nowrap>

<swe:this property="FormattedHtml" hintText="Edit" hintMapType="Control"/>

</td>

<td>&nbsp;</td>

</swe:control>

(and so on...)

For the application level menu, the <swe:menu> tag can be specified in any template other than an applet template. The set of menus is rendered from the one <swe:menu> tag, based on the Menu and Menu Item object definitions in the repository. The Menu object definition that is used is the one pointed to by the Menu property in the Application object definition. This Menu object definition specifies a set of top-level menu names and menu options within each top-level menu. The Profile and Logout menu options are automatically provided in all applications, and do not have to be defined within the application's Menu object definition and its children.

The following code sample (from CCFrameBanner.swt) illustrates the inclusion of the <swe:menu> tag at the start of the definition for a banner:

<!--Start Banner-->

<swe:menu/>

<table class="banner" cellpadding='0' cellspacing='0' border='0'>

<tr>

<td width="50%">

<img src="images/SiebelLogo.gif" width="282" height="57" border="0" alt="" />

</td>

<td width="50%">

<img src="images/spacer.gif" width="100%" height="58" border="0" alt="" />

</td>

</tr>

The syntax for the <swe:menu> tag appears as follows:

  • <swe:menu>

    Purpose:

    Renders menu buttons or links for all menus defined for the relevant entity, either an application or an applet. For an application, one button or link is rendered for each top-level menu defined for the application (in its associated Menu object definition and children). For an applet, one button is rendered, the applet menu button.

    Usage:

    <swe:menu type="XXX" bitmap="XXX" width="XXX" height="XXX" bgcolor="XXX" fgcolor="XXX" />

    Attributes:

    • type. The type can be set to Default (which is the default value if this attribute is not specified) or Button. If set to Default the menu is rendered showing the top-level menu entries (like File Edit Help). If set to Button, a button is created that, when activated, shows a drop-down menu with the top-level menu entries.
    • bitmap. This attribute is used only when the Type attribute is set to Button. This attribute is used to specify the name of a bitmap object to be used as the label for the button. This bitmap is defined in Tools under the bitmap category HTML Control Icons.
    • width. This attribute is used to specify the width of the menu in pixels.
    • height. This attribute is used to specify the height of the menu in pixels.
    • bgcolor. This attribute is used to specify the background color of the menu. The color should be specified using the hexadecimal triplet format used in HTML like #FFFFFF.
    • fgcolor. This attribute is used to specify the foreground color of the menu. The color should be specified using the hexadecimal triplet format.
Configuring Siebel eBusiness Applications