2 10 Types

LANSA WAM

2.10 Types

The type weblet – std_types – is not visualized.

The std_types weblet defines the type of information that is valid to be entered for a weblet property. Types are declared in the XSL source by providing an attribute wd:type, assigning a type name and then detailing the type of information which is valid for this type.

For example, locate the following code in the std_types document:

It is easy to deduce from this type definition that any weblet property that refers to this type std:border_style will relate to a border style and include a valid set of values which correspond to the values on the wd:enumeration statements.

To verify this, add a panel (std_panel) weblet to a web page and select the tab to review the associated panel properties. Check the values available in the dropdown list associated with the border property. As you would expect the dropdown's values match the wd:enumeration statements.

Now open the std_panel weblet and review the XSL source to see how the relationship between a weblet property and the type is established.

First of all note that the std_types document is imported into the std_panel weblet's XSL source:

Now scan down the XSL source and you will find a relationship defined between the weblet property and the type definition.

So it all comes together!

Tip: If you are defining your own weblets, you may refer to the types defined in the std_types document to indicate what values are valid for your weblet properties. It is not anticipated that you will need to create your own types.