Siebel Developer's Reference > SWE Tags >

swe:subviewbar, swe:for-each-subview


Purpose

swe:subview

A subcategory View picklist is implemented using a <swe:subviewbar> tag. The <swe:subviewbar> tag can alternately be configured to display a second horizontal tab bar beneath the detail View bar, but the picklist is the preferable approach.

The default behavior of the <swe:viewbar> tag, if the <swe:subviewbar> tag is not present, is to display the default View for that category when the user selects the category name in the detail View bar. The default View is the View with the lowest sequence number in that category that is visible to the user.

By including the <swe:subviewbar> tag, this behavior is augmented with a picklist or subcategory tab bar that conditionally appears when the currently active View belongs to a category. This tag expands to list all the Views that belong to the selected category. If the currently active View does not belong to a category, then this tag does not render anything on the page. Thus, if the user chooses a category name from the detail View bar (which means the default View within that category is now the active View), the subcategory picklist or tab bar is rendered in that default View if this tag is present. If the user chooses a noncategory view from the detail view bar, the subviewbar tag does not render anything on the resulting page.

swe:for-each-subview

This tag is used when the type attribute of <swe:subviewbar> is not set to Select. This tag iterates over each of the subviews. This is similar to the behavior of <swe:for-each-view>.

Syntax

The <swe:subviewbar> tag syntax is described below:

<swe:subviewbar type="xxx" property="zzz">

Attributes

Type. This can have one value, Select. If the type is set to Select, the subview bar is rendered as an HTML select control (picklist) showing the set of available Views in the selected category.

Property. This attribute is to be used only when the type is set to Select (it has no effect in other cases). This attribute can have a value of FormattedHtml, in which case the HTML Select control is rendered. If this attribute is not specified, then this tag acts as a conditional tag to show its contents if there are subviews.

When the Type attribute is not set to Select, <swe:viewlink> and <swe:viewname> tags are used within the body of the <swe:subviewbar> tag. The behavior of these tags is similar to their use inside of a <swe:viewbar> tag.

Examples
  • As an HTML select control (subcategory picklist): Refer to CCViewDetail.swt and CCSubViewbar_Drop.swt:

<swe:form>

<swe:subviewbar type="Select">

<tr class="tier4On">

<td>&nbsp;&nbsp;&nbsp;</td>

<td valign="top"><swe:pageitem id="2" property="DisplayName" /></td>

<td ><swe:this property="FormattedHtml" /></td>

<td width="100%">&nbsp;</td>

</tr>

</swe:subviewbar>

</swe:form>

  • As tabs or links in a subcategory tab bar (refer to CCSubViewbar_Tabs.swt):

<td class='tier4Off'><img src="images/nav/left_cap.gif" align="absmiddle" width="6" height="19" border="0" alt=""/></td>

<swe:subviewbar>

<swe:viewlink state="Active" property="FormattedHtml" >

<td><img src="images/nav/tabon_arrw.gif" align="absmiddle"
width="6" height="19" border="0" alt=""/></td>

<td class='tier4OnLabel' background="images/nav/tabon_back.gif"><nobr>&nbsp;<swe:viewname/>&nbsp;</nobr></td>

<td><img src="images/nav/tabon_rightcap.gif" align="absmiddle" width="6" height="19" border="0" alt="" /></td>

</swe:viewlink>

<swe:viewlink state="Inactive" property="FormattedHtml" >

<td class='tier4Off'><nobr>&nbsp;<swe:viewname/>&nbsp;img src="images/nav/tab_rightcap.gif" align="absmiddle" width="6" height="19" border="0" alt=""/></nobr></td>

</swe:viewlink>

</swe:subviewbar>

<td width="100%" class="tier4Back">&nbsp;</td>

Siebel Developer's Reference