|Bookshelf Home | Contents | Index | PDF|
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 2 or 3) for a given screen. There is always 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 or search operations.
The examples in this document describe creating multiple view layouts when SWE frames are used. The process is similar when frames are not used. In such cases HTML tables can be used in place of frames and framesets to position the views.
To support multiple views, the structure of framesets and frames used in the application needs to be modified. In addition to frame sets and frames, you must also modify a layer called the Content Container. You can think of this as the container page for the Content area.
The frame of type View, which used to be 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 contains a frameset that has the View type frame.
After making this change, the application should behave as before. An additional layering of frames in the content area was introduced. The previous application container page template that had the View frame without the outer Content frame does not generate any errors, but does allow showing multiple views in the application.
To show additional views in the content area, load a different Content Container page in the Content frame. 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.
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:
The location or zone occupied by an alternate view is identified by the View ID, which is Search in the above example. This is necessary because, just as with the main view, you want to be able to navigate to other views. In other words, there are multiple view zones now. In the above example, SWE navigates to the Search view automatically when the Search View Zone is shown the first time. After that, the specialized frame code in the Search view can do a BuildViewAsync() or provide controls of GotoView invokemethod for the users to navigate to other views. The main view has a NULL view ID.
When calling BuildViewAsync(), set the pViewId parameter to the desired View ID. If you are calling from a frame, you can use the frame's view ID, which is set in the data member m_cszViewId of the frame. This causes a navigation to another view within the same view zone. You can also cause the main view to navigate to another view using BuildViewAsync(). Be sure to set the pViewId parameter to NULL.
|Siebel Developer's Reference|