About the Template Manager Class
The Template Manager class generates HTML for various controls, and uses the following method and syntax:
GenerateMarkup( configObject );
The GenerateMarkup method uses only one argument, that is an object. Depending on the properties present in object, Template Manager chooses the appropriate flow for the generation of the HTML. The following list describes the different properties that you can specify via configObject:
type. Specify the type of control to generate. For a list of types, please see the following table. When not specified, the value will default to the input field or SWE_CTRL_TEXT.
class. Specify the class name to attach to the control. If multiple classes need to be attached, use a space-separated string. TM will also attaches pre-defined CSS class name for the control, based on the type of control being generated.
id. Specify the ID which needs to be given to the control. Depending on the control type provided, auto generated value for ID can be attached by TM to the control if not provided.
values. Specify the value that needs to be attached to the control.
Note: When specifying ComboBox for the type, you can specify an array of values. Also, the selected index needs to be specified with the property index.attrs. Specify any other attribute that should be attached to the control, in string format. For example, if you need aria attributes
aria-label
,aria-labelledby
, andaria-describedby
to be attached to the control, you would use the following code:"aria-label='abc' aria-labelledby='xyz' aria-describedby='123'"