9 1 5 Web Components and Modes

LANSA Web Functions

9.1.5 Web Components and Modes

LANSA for the Web allows you to define the following modes for Web components used in Web functions:

  • Input
  • Output
  • Not Applicable.

The input mode components are used when a REQUEST or DISPLAY screen is input capable.

The output mode components are used when a REQUEST or DISPLAY screen is output only. The output mode component is always used for hidden fields, even on input capable screens.

The not applicable mode is used for components not used in the input or output screen area. For example a STDFOOTER or STDHEADER page is defined as not applicable since it is not part of the input or output screen area. The component is used to define the structure of the page.

When you compile your LANSA Web function, LANSA checks if mode dependent components exist for the fields defined in your function. If the mode of operation is input capable, it will use the input mode Web component, if one exists, to replace the field. If the mode of operation is output, it will use the output mode Web component, if one exists, to replace the field.

If mode dependent Web components are used in your Web function applications, these can be identified by the LANSA tag, <RDML COMPONENT="<field name>" MODE="<mode>">.

For example, if you have the following RDML statement in your Web function:

REQUEST FIELDS((#STDNEXT *HIDDEN)(#DEPTMENT)(DEPTDESC *OUTPUT))

and you have create Web components STDNEXT, DEPTMENT and DEPTDESC, then the following Web components will appear in your HTML page:

<RDML COMPONENT="STDNEXT   " MODE="O">

<RDML COMPONENT="DEPTMENT  " MODE="I">

<RDML COMPONENT="DEPTDESC  " MODE="O">

The mode of the component is part of the component definition. For more details, refer to the specific type of Web component you wish to create.

 

WEB008 - Web Components