Summary
Important Observations
- A WEBEVENT function may contain more than one REQUEST and/or DISPLAY statement. The HTML pages are created for each REQUEST and DISPLAY, but only the first statement will be processed. By definition, WEBEVENT functions terminate after a display is processed.
- Two REQUEST statements were used as a means of having LANSA generate the HTML for the fields. Once you are an experienced LANSA Web function developer, you may not require the second display statement. For documentation purposes, the second display statement is very helpful to other developers.
- In this example, a multilingual partition was used. The RDML MERGE tags (for example <RDML MERGE="&T0001+0001+0020">) for the field labels were removed and labels were manually entered. If you do not manually replace the field labels with text, you must update the MERGE tags after a function is recompiled.
Tips & Techniques
- You can use this technique with almost any display. The screen can include input field, output fields, browse lists, etc.
- When using this technique, you should always use a REQUEST statement for the Web Page component. Your second statement (i.e. the actual screen layout) can be a REQUEST or DISPLAY. Using a REQUEST will simplify the HTML generated as modes are not used.
- You can link WEBEVENT functions using keywords or by using Web Link components. You may also use JavaScript and the HandleEvent function to control navigation in WEBEVENT functions.
What I Should Know
- How to use a Web page component to replace the display so that recompiling the function does not impact the customized HTML.