Show TOC

A Sample BSP ApplicationLocate this document in the navigation structure

Use

There is a sample BSP application called stateful_stateless_sample in your system (package SBSP_SAMPLES). It contains the application class thtest, which consists of only one attribute of type STRING, as well as 3 BSPs.

On the first page, default.htm, you choose whether you want to work in stateful or stateless mode. Depending on what you choose, the value RUNTIME->KEEP_CONTEXT is set to 0 or 1.

Whichever you choose, the application navigates to the page page1.htm. On this page, you can set the initial string of the application class by entering it in a HTML field. Choose to second page to navigate to the next page, page2.htm. On this page, the string in stateful mode has the value just set; in stateless mode the string is empty (initial) again.

This is because in stateful mode the instance of the Application Object always retains its current value in the user context. In stateless mode, the object is re-generated on page1.htm when the application object is accessed.

The graphic below illustrates the process.