Siebel Tools Reference > Physical UI Navigation and Templates > Page Templates >

Support for Multiple Views on a Page


The SWE framework supports showing multiple views simultaneously on a page. The multiple views consist of a Main view and one or more Alternate views. The main view is the view that is selected using the view bar (level two or three) for a given screen. There is only one main view. Alternate views are other views that can be shown along with the main view: for example, the Search View that shows applets that can be used for find/search operations.

The multiple views shown on a page can be placed into separate HTML frames or can share the same frame. Multiple views can also be shown with the main view in the main browser window and a single alternate view in a pop-up window.

In employee applications that use high interactivity, only the main view can be in high interactivity. The alternate views will be shown in standard interactivity. It is recommended that you configure alternate views as simple views without any complex navigation links.

NOTE:  The examples given here describe creating multiple view layouts when HTML frames are used. The process is similar when frames are not used. In such cases, HTML tables can be used in the place of frames and framesets to position the views.

To support multiple views, the structure of framesets and frames used in the application has to be modified. Defined framesets and frames in the application's container template and in the view template were discussed earlier in chapter. In addition, there is another layer, the Content Container (the container page for the Content area).

The frame of type View which was in the Application's Container page should be replaced with a frame of type Content. This frame defines the area where one or more views can be loaded. Initially this frame will contain a frameset that will have the View type frame.

The structure of the container template is given in the example below:

<swe:frameset htmlAttr="rows='80,50,50,*' border='0' frameborder='No'">

<swe:frame type="Page" htmlAttr="marginheight='0' marginwidth='0' noresize scrolling='No'">

<swe:include file="CCBanner.swt"/>

</swe:frame>

<swe:frame type="Screenbar" htmlAttr="marginheight='0' marginwidth='0' noresize scrolling='No'">

<swe:include file="CCScreenbar.swt"/>

</swe:frame>

<swe:frame type="Viewbar" htmlAttr="marginheight='0' marginwidth='0' noresize scrolling='No'">

<swe:include file="CCViewbar.swt"/>

</swe:frame>

<swe:frame type="Content" htmlAttr="marginheight='0' marginwidth='0' noresize scrolling='Yes'">

<swe:include file="CCMainView.swt"/>

</swe:frame>

</swe:frameset>

The file CCMainView.swt defines a frameset that contains the main view.

<swe:frameset htmlAttr="cols='100%' border='0' frameborder='No'">

<swe:frame type="View" htmlAttr=" noresize scrolling='Yes'">

<swe:current-view/>

</swe:frame>

</swe:frameset>

After making this change, the application should behave as before. All that was changed was the introduction of one additional layering of frames in the content area. The previous application container page template that had the View frame without the outer Content frame does not generate any errors, but does not allow showing multiple views in the application. All the application container templates should be modified to use the Content frame.

To show additional views in the content area, a different Content Container page in the Content frame should be loaded. This can be done by invoking the method LoadContentContainer from a control or page item. The Content Container to be loaded should be passed in using the User Property Container.

NOTE:  This should be set to the Web Template Name of the content container page and not to the .SWT file name. For example, to show the search view along with the main view, create a content container page (for example, CCSMainAndSearchView.swt), and load it using the LoadContentContainer method. CCSMainAndSearchView.swt contains the tags to load the main view and search view into two frames as shown:

<swe:frameset htmlAttr="cols='100%' border='0' frameborder='No'">

<swe:frame type="View" htmlAttr="noresize scrolling='Yes'">

<swe:current-view/>

</swe:frame>

<swe:frame type="AltView" name="Search" htmlAttr="noresize scrolling='Yes'">

<swe:view name="Search View" id="Search" />

</swe:frame>

</swe:frameset>

The main view is still called the <swe:current-view> tag. Alternate views are referred to using the <swe:view> tag.

The <swe:frame> tag contains alternate views called AltView.

To switch from showing the Search and Main views to showing only the Main View, invoke the LoadContentContainer method again, this time passing in the CCMainView.swt based container page.


 Siebel Tools Reference
 Published: 20 October 2003