Choosing a navigation style  Sample *View.xml file

Chapter 11: Building Page Groups

Sample navstyles.xml file

The code fragment below shows a typical navstyles.xml file. The example is from the FWPageServer Web application.

<?xml version="1.0"?>
<NavigationStylesConfigDoc>
<!--Default supports Netscape, IE browsers - Mozilla user agents -->
<!--Will be this the generic one for all devices/clients-->
     <NavStyle name="Default" clientpattern="Mozilla">
        <AppDefinition name="FWTopMenu">
           <Target default="topmenu_mop_ie" alternate="topmenu_mop_ie" />
        </AppDefinition>
        <AppDefinition name="FWPageServer">
           <Target default="main_IE" alternate="main_IE" />
        </AppDefinition>
     </NavStyle>
<!-- support IE browsers on PocketPC devices running on Windows CE -->
     <NavStyle name="PocketPC" clientpattern="MSIE" platform="Windows CE">
        <AppDefinition name="FWGuestPage">
           <Target default="guest" alternate="ppclogin" />
        </AppDefinition>
        <AppDefinition name="FWLogin">
           <Target default="default" alternate="default_ppc" />
        </AppDefinition>
        <AppDefinition name="FWMyOnePage">
           <Target default="myonepage_ie" alternate="myonepage_ppc" />
        </AppDefinition>
        <AppDefinition name="FWTopMenu">
           <Target default="topmenu_mop_ie" alternate="topmenu_ppc_ie" />
        </AppDefinition>
        <AppDefinition name="FWPageServer">
           <Target default="main_IE" alternate="main_ppc_ie" />
           <Target default="emptypage" alternate="main_ppc_ie" />
        </AppDefinition>
        <AppDefinition name="FWTileServer">
           <Target default="standard_tile" alternate="standard_tile_ppc_ie" />
        </AppDefinition>
     </NavStyle>
</NavigationStylesConfigDoc>

The NavStyle element specifies the navigation style name. The AppDefinition element specifies the Model View Controller (MVC) application. The default attribute in the Target element specifies the default logical name returned by the MVC application command, and the alternate attribute specifies the alternate logical name to use for the style. These logical names must exist in the applications View XML file (see “Sample *View.xml file”). For example, the guest page for the PocketPC style shown in the proceeding code has the default logical name of guest and the alternate logical name of ppclogin.





Copyright © 2004. Sybase Inc. All rights reserved. Sample *View.xml file

View this book as PDF