4.1 What is a WEBEVENT Function?

LANSA allows you to create a special type of RDML Web function specifically for use with the Internet. This Web function is called a WEBEVENT function.

The WEBEVENT function is designed specifically for the Internet user and the browser paradigm. In the browser paradigm, a persistent connection is not required. Each page is independent. You cannot dictate the navigation path of your application to the user. The Internet user has a Back button in the browser, which allows them to go back several pages and resubmit a request.

A function is defined to be a WEBEVENT function by specifying the following option in the RDML FUNCTION command:



With WEBEVENT functions, the LANSA function will terminate after a DISPLAY or REQUEST command is executed. No other logic will be executed after the HTML page for the function is sent. Using this technique, you must code your functions to properly process the information when the user decides to submit a screen with data. The logic of the RDML function must be written specifically for WEBEVENT. You cannot simply add the *WEBEVENT keyword to your functions.

WEBEVENT functions cannot use any of the standard function keys, i.e. Exit, Cancel, Add, Change, Delete, Prompt, etc. because the function terminates once the display is sent. Instead, navigation can be controlled by keywords in the USER_KEYS parameter of the DISPLAY or REQUEST command (or by using links from one page to another). Each description of the user key is a keyword that is used to link one LANSA function to another. Each of these user keys will be displayed as a button. When the user selects a button, the linked function will be called.

When the linked function is called, all form variables, hidden fields and any browse list data will automatically be exchanged with the called function. For more details, refer to 4.6 Automatic Data Exchange.

For a detailed example of writing WEBEVENT functions, refer to 4.5 WEBEVENT Example.


WEB003 - Coding WEBEVENT Functions