Click or drag to resize

TmplItem Reference

[This is preliminary documentation and is subject to change.]

The TmplItem class, class it the base class for ALL elements used in form templates and the structure file.

Class hierarchy

The class TmplItem is the root in a class hierachy, that describes all the elements that may be used to configure form templates) and define relation between forms and hence the configurable data model in the structure file.

TmplItem is an abstract class (it cannot be instantiated). A configurator cannot use this class directly in neither form templates nor the structure file.

All properties on TmplItem exist in all elements used in form templates and the structure file. Not all properties are meaningful on al elements, though. For example: properties for styling/CSS-classes and JavaScript events are meaningful in form templates, but NOT in the structure file.

Many, but not all, of the fields defined in classes in this class hierachy, are settable in the XML files. All fields settable in XML files may be edited using the editor.

Unfortunately it is not apparent from the API documentation for the TmplItem, which properties are editable and which are not. (the API reference is generated automatically from the source code).

All propeties listed in this "Reference" part of the doumentation are setable in the XML files and the editor.

TmplItem properties

Property

Type

Description

Hidden

Boolean

Hidden fields generate fields in DataDictionary (and hence database), but are not visible in input form.

Deleted

Boolean

The template item (and anything below it) is skipped when generating DataDictionary, so fields will not be generated in database.

ExcludeFromPrint

Boolean

The template item is excluded from the printed version of the form

Comment

String

Internal comment for use by form designer

ClearOnCopy

Boolean

The template item will be cleared before copying (see: EnableCopying attribute on Form Reference)

VisibleComputation

String

TOPICA basic computation (formula) that must evaluate to a boolean value controlling visibility of item - true => item is visible

ClassNameLabel

String

Stylesheet classname for the label generated for this template item

ClassNameLabelCell

String

Stylesheet classname for table cell containing label

ClassNameControl

String

Stylesheet classname for the control genereated for this template item

ClassNameControlCell

String

Stylesheet classname for table cell containing control

StyleLabel

String

Inline style for the label generated for this template item

StyleLabelCell

String

Inline style for table cell containng label

StyleControl

String

Inline style for the control generated for this template item

StyleControlCell

String

Inline style for table cell containing control

OnKeyDown

String

Custom JavaScript for onkeydown event

OnKeyUp

String

Custom JavaScript for onkeyup event

OnKeyPress

String

Custom JavaScript for onkeypress event

OnClick

String

Custom JavaScript for onclick event

OnChange

String

Custom JavaScript for onchange event

OnFocus

String

Custom JavaScript for onfocus event

OnBlur

String

Custom JavaScript for onblur event

PreProcess

String

URL pointing to a pre process that will be executed before the form is loaded. The pre process should return xml that can then be parsed by template items on the form to set a default value.

PostProcess

String

URL poiting to a post process that will be executed each time the form is saved.

See Also

Other Resources