RDML Function Skeleton SET203A

LANSA

RDML Function Skeleton SET203A
* =======================================================;
* Process ........: SET_203;
* Function .......: SET203A;
* Description ....: Basic Webevent Function Skeleton;
* Version.........: 1;
*;
* Full Description:;
*;
* This RDML shows a basic structure of a webevent;
* function. It has been created to help developers;
* starting with LANSA for the WEB write structured;
* Webevent functions.;
*;
* You can copy this function whenever you are creating a;
* new Webevent function and change it according to the;
* specific needs of your application.;
*;
* Disclaimer: The following material is supplied as;
* example material only. No warranty concerning this;
* material or its use in any way whatsoever is;
* expressed or implied.;
*;
* Minimum Release of LANSA Required : 8.0;
*;
* =======================================================;
FUNCTION OPTIONS(*DIRECT *WEBEVENT);
*;
* Define a field that will contain the value of the;
* button that was clicked in the browser.;
* #S_CLICKED has been given a 9 character field name.;
* This is recommended for fields that will be referred to;
* in the form "document.LANSA.AS_CLICKED.";
* By evaluating this field in the CASE statement,;
* your function will know the button clicked and act;
* accordingly.;
* The length of the #S_CLICKED is deliberatly defined to;
* allow a long self explanatory value. The value it;
* defaults to is the value the field will contain when;
* the function starts running. Refer to the CASE;
* statement. Anything that is done in the INIT_EVENT;
* subroutine will be executed the BEFORE the web page;
* appears on your browser for the first time.;
DEFINE FIELD(#S_CLICKED) TYPE(*CHAR) LENGTH(030) DEFAULT('FORM.INITIALIZE');
* =======================================================;
* Button components.;
* =======================================================;
*;
* Other fields;
*;
GROUP_BY NAME(#PANELDATA) FIELDS((#S_CLICKED *HIDDEN));
*;
* Mainline;
*;
CASE OF_FIELD(#S_CLICKED);
WHEN VALUE_IS('= FORM.INITIALIZE');
EXECUTE SUBROUTINE(INIT_EVENT);
ENDCASE;
*;
* This is a web event function. As such, it will run,;
* display this screen and then terminate.;
* The contents of field #EMPNO, and any other;
* input or hidden fields will be automatically passed;
* to the next iteration of this function.;
* =======================================================;
REQUEST FIELDS(#PANELDATA) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
*;
SUBROUTINE NAME(INIT_EVENT);
MESSAGE MSGTXT('Initialize subroutine executed. Message issued by SET203B.');
ENDROUTINE;
*