OpenAjax is a JavaScript library that is included in the Lite Client. Open Ajax includes the OpenAjax hub that implements a publish and subscribe message passing model.

The user subscribes to a message by calling the OpenAjax.hub.subscribe function with a message name, a callback function, the callback function scope object, an optional object holding subscriber data, an optional callback function to filter the subscription callback calls.

The user publishes a message by calling the OpenAjax.hub.publish function with a message name and a message data object. The hub will then look for any subscriptions with that message name and call the subscription callback function with the message name and data for each subscription.

The user is returned a handle when they call the subscribe function and this handle can be passed to the OpenAjax.hub.unsubscribe function to remove the subscription.

The message name (used both for publish and subscribe) defines a path where path elements are separated by full stops. A subscribe path element can be a wild card. A single asterisk wild card matches any publish path and a double asterisk matches any subscriptions at the current path level.

 

Menus and Toolbar Data

The Lite Client does not display PROIV menus and toolbars. The Lite Client will publish the menu or toolbar data in OpenAjax when it is sent by the PROIV session to the client. This will be published with a message name of ‘proiv.menu’.

The developer can write JavaScript to run in the page that may subscribe to ‘proiv.menu’ messages and use the menu data appropriately.

e.g.

    function sessionMenuData(name, data) {
        // this function handles published PROIV session menu data.
        ….
    }
    var menuSubscription = OpenAjax.hub.subscribe(‘proiv.menu’, sessionMenuData);

Status Data

The Lite Client does not display the PROIV session status bar. The Lite Client will publish the any status data in OpenAjax when it is sent by the PROIV session to the client. This will be published with a message name of ‘proiv.status’.

The developer can write JavaScript to run in the page that may subscribe to ‘proiv.status’ messages and use the status data appropriately.

e.g.

    function sessionStatusData(name, data) {
        // this function handles published PROIV session status data.
        var sessionKey = data.sessionKey;
        var function = data.function;
        var functionTitle = data.functionTitle;
        var message = data.message;
        var mode = data.mode;
        ….
    }
    var statusSubscription = OpenAjax.hub.subscribe(‘proiv.status’, sessionStatusData);

On Line Help Data

The Lite Client does not display PROIV session on-line help. The Lite Client will publish the help data in OpenAjax when it is sent by the PROIV session to the client. This will be published with a message name of ‘proiv.help’.

The developer can write JavaScript to run in the page that may subscribe to ‘proiv.hep’ messages and use the help data appropriately.

e.g.

    function sessionHelpData(name, data) {
        // this function handles published PROIV session help data.
        var sessionKey = data.sessionKey;
        var helpKeyword = data.keyword;
        …
    }
    var helpSubscription = OpenAjax.hub.subscribe(‘proiv.help’, sessionHelpData);

Comment on this topic

Topic ID: 870030

Table of Contents

Index

Glossary

-Search-

Back