7 7 RDML COMPONENT

LANSA Web Functions

7.7 <RDML COMPONENT>

Syntax:

<RDML COMPONENT="<component>" MODE="<mode>">

 

Description:

This tag instructs LANSA to include components into the HTML page being processed. It allows you to use the Web component technology provided by LANSA Web functions.

The MODE keyword allows you to specify the correct component to use according to the screen mode. The mode can be either "I" (input mode) or "O" (output mode). This keyword is used for mode dependent Web components and is optional.

LANSA Web functions allow you to dynamically define the component you want to use in conjunction with this tag. If you want to dynamically set the component name, the syntax of the tag is:

<RDML COMPONENT="&FLD_<field name>">

where <field name> is the name of your field in the RDML function. This is the field that contains the name of the actual component to use with the tag. The value of the field should be set in the RDML function.

 

 

Once the <RDML COMPONENT> tag is embedded into the HTML, you can change the definition of the Web component without having to edit the function or to recompile the function. You can modify the contents of the Web component independently.

For example, you can change the Visual Web component type from a drop down to a set of radio buttons by just changing the definition of the Visual Web component. Once the change is made, it will be reflected dynamically when the Web component is next used. There is no recompiling or editing of the HTML required.

The following example instructs LANSA to include a standard HTML header in the page:

<RDML COMPONENT="STDHEADER"> 

The MODE keyword allows you to specify whether the component is used for input or output, i.e. is the user entering data or is data simply being displayed to the user. For example:

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

indicates that a component called DEPT should be embedded when the page is used for entering data or input. This component might be a drop down list or a set of radio buttons which are used to enter a department code.

Dynamic Embedding of Components

LANSA Web functions allow you to dynamically define the component you want to use in conjunction with the <RDML COMPONENT> tag. This is done by using the special "&FLD_" designation with a field in your RDML function. For example:

<RDML COMPONENT="&FLD_DEPTMENT"> 

In your RDML function, the DEPTMENT field will contain the name of the component which you want to embed in your application. For instance, if you were to CHANGE FIELD(#DEPTMENT) TO(ADM) in your function, then a component named ADM would be used. This is similar to using the following statement:

<RDML COMPONENT="ADM"> 

By using the &FLD_ feature, you are able to set the component name in your function rather than coding the value into your HTML page.