Master-Detail page example

Note

The source files for this example are available online. You can download them from [external link] http://www.ianywhere.com/developer/code_samples/master_detail_mbus.html.

The master-detail page sample illustrates the common situation where one a master page provides summary level information on customers. A master page could deal with accounts, products, or any other category of information. From this master page, the user can drill down and see the detail level of information for any selected entry on the master page.

This sample code illustrates use of:

  • On-device data to dynamically generate pages

  • List Viewer to display a table of information and sort the table on a column by clicking the column header

  • M-Business database API to filter the information displayed

  • PODSPrefs object to maintain the application state when switching between pages

The following source files are provided with this sample code:

  • Master page – presents summary information on customers, from which user can select a particular customer for which to see detailed information; user can also filter and sort the customer summary information.

  • Detail page – presents detailed information on the customer selected on the master page.

  • Pages to download supporting binaries – shows how the AG_DEVICEOS macro is used to download the correct binaries for either Microsoft OS or Palm OS devices.

  • Customer data XML file – shows the structure of the XML data that was downloaded into the on-device datastore to dynamically generate the master and detail pages.

  • Customer XML data schema file – shows the schema file associated with the XML data.


Master page
Master page for Microsoft Smartphone
Detail page
Pages to download supporting binaries
Customer data XML file
Customer XML data schema file