Collection Contents Previous Next PDF

UltraLite for M-Business Anywhere User's Guide

Understanding UltraLite for M-Business Anywhere Development

Maintaining connections and application state across pages


The scope of a JavaScript variable is limited to one web page. Most web applications require multiple pages, and so a mechanism is needed for making some objects persistent across the pages of an application.

UltraLite for M-Business Anywhere provides persistence for the ULTable, ResultSet, and PreparedStatement objects. To make one of these objects persist across pages, supply a persistent name as a parameter when creating the object. You can use the persistent name on subsequent pages.

To carry a connection object from page to page, you reopen the connection on each page. One way to do this is to use the reOpen method. Another is to supply an open method on each page, perhaps by including a JavaScript file on each web page to initialize the settings. For examples of how to do this, see the sample files Samples\UltraLiteForMBusinessAnywhere\CustDB\main.htm and Samples\UltraLiteForMBusinessAnywhere\Simple\main_page.htm.

The requirement to reopen connections across pages provides a security feature for UltraLite applications. You can use it to require that the user confirm some information, perhaps the password, on moving from page to page.

See also 

Collection Contents Previous Next PDF