FIELD element

The FIELD element specifies a data value to be displayed in a CLUSTER, a value to be retrieved from the user via an input control in a CLUSTER, or a list of data values to be displayed in a LIST column. FIELD elements can also be aggregated within CONTAINER elements so that they fill a single cell of a CLUSTER or LIST element.

Note that when the FIELD element is used to display a code table hierarchy either on an edit or ready-only page, the following should apply:

  • For an edit page, only one FIELD element is needed to display a code table hierarchy with a domain definition inherited from CODETABLE_CODE that has the code table name set to the lowest level code table in a hierarchy. The CDEJ infrastructure automatically determines its code table hierarchy and then displays however many dropdowns it has, i.e. if it is a three level hierarchy, then the three levels are displayed.
  • For a read-only page, however only the lowest level code table value is displayed on the screen by the same way using a single FIELD element as the edit page. And the CDEJ infrastructure does not support on displaying its full hierarchy.

Attributes

The FIELD element has the following attributes:

Table 1. Attributes of the FIELD element

Attribute Name

Required

Default

Description

LABEL

No

 

A reference to an externalized string that needs to be used as the associated label for this field. The LABEL attribute is mandatory when a CONNECT element exists that contains a TARGET.

LABEL_ABBREVIATION

No

 

A reference to an externalized string that contains the associated label abbreviation text for this field. This label abbreviation is placed only on table headers in a LIST.

DESCRIPTION

No

 

A reference to an externalized string that is displayed below the label text.

ALT_TEXT

No

 

A reference to an externalized string that is used as the alternate text for the field. This reference is applicable only when the field has a target connection, that is, it is an input field. If this attribute is added to a mandatory input field, the text Mandatory is appended to the externalized string. If this attribute is not specified, the LABEL is used. Browsers that are supported by the Cúram application display alternate text when the mouse is hovered over the input control.

WIDTH

No

 

Specifies the width of the field value within its cluster or list cell.

WIDTH_UNITS

No

PERCENT

The units in which the width is interpreted. This measurement can be PERCENT to indicate the percentage of the space available to the field, or CHARS to indicate the number of visible characters the field needs to accommodate.

HEIGHT

No

1

For input fields that resolve to a text input control, this input specifies the number of visible lines of text that the control displays. For input fields that resolve to a selection list, this value specifies the number of entries that are initially displayed. For example, a scrollable selection list is displayed instead of a drop-down selection list.

ALIGNMENT

No

DEFAULT

Defines the horizontal alignment of the field value. Can be set to LEFT, RIGHT, CENTER, or DEFAULT. The value DEFAULT corresponds to the CSS class default in the curam_common.css. Currently the default is to be left-aligned. In a CLUSTER, only input fields are aligned. In a LIST, all fields are aligned.

USE_DEFAULT

No

true

If set to true (the default) and the field has no SOURCE connection, then if a sensible default value for the field can be determined automatically, it is displayed.

For example, numeric fields display a zero, string fields are empty, and date fields defaults to the current date.

USE_BLANK

No

false

If the field source is a code-table-based property, or a server interface list property, it is displayed in a list. If this attribute is set to true, an extra blank value is added to the top of the list.

CONTROL

No

DEFAULT

The CONTROL attribute can take one of a number of values:

  • DEFAULT - The field behaves in the standard fashion.
  • SUMMARY, DYNAMIC, DYNAMIC_FULL_TREE, and FAILURE - These settings apply only to rules fields. For more information, see Rules Trees.
  • SKIP - Indicates that the field is only present to occupy space in a CLUSTER to balance the layout. No label or value is displayed. However, the label background still is presented.
  • TRANSFER_LIST - Enables a list on a page to be displayed as a transfer list widget. This mode is only applicable and supported for list controls with multiple selection capability.
  • CT_HIERARCHY_HORIZONTAL - Displays a list as a horizontal code table hierarchy.
  • CT_HIERARCHY_VERTICAL - Displays a list as a vertical code table hierarchy. For more information on code table hierarchies, see the Cúram Server Developers Guide.

CONFIG

No

 

Identifies configuration details for this FIELD instance. This attribute can be used only with a FIELD whose CONTROL attribute is for a widget that supports configuration. For example, if the CONTROL attribute is DYNAMIC for a FIELD of the RESULT_TEXT domain then the CONFIG attribute needs to match an ID on a config element in the RulesDecisionConfig.xml file. For more information on configuration, see Dynamic Rules View.

CT_DISPLAY_LABELS : Displays labels for each code table in a code table hierarchy. . For more information on code table hierarchies, see the CONTROL attribute in FIELD element.

INITIAL_FOCUS

No

false

A FIELD element, whose INITIAL_FOCUS attribute is set to true, gets focus when the page is displayed. In other words, the cursor is placed in that field ready for data entry. If no FIELD requests the initial focus, the cursor is placed in the first input field on the page. It is not allowed to have more than one FIELD with the INITIAL_FOCUS attribute set to true specified on a page.

PROMPT

No

false

This attribute is used to configure a placeholder value in the field that is associated with a Date Selector, if the field is blank. On focus, the placeholder text disappears to allow for data entry.

CONTROL_REF

No   This setting is used to configure Dynamic Conditional Clusters. The purpose of the CONTROL_REF is to set the controlling input. If something is selected, a cluster becomes visible. The CONTROL_REF attribute is set to an identifier that is evaluated by the JavaScript.

Child elements

The FIELD element can contain the following child elements.

Table 2. Child Elements of the FIELD Element

Element Name

Cardinality / Description

CONNECT

0..3. A field can contain up to three CONNECT elements. The SOURCE connection defines the initial value for the field (this will be the static value shown if there is no target end-point, or the initial value of an input control if there is a target end-point). The TARGET end-point defines the property that will be set from the field value during the action phase. If a TARGET end-point is specified the SOURCE end-point can only be from a server interface property. This is because domain information is required to correctly format the value for display in the input control.

If an INITIAL end-point is used and the property is not a list value, it specifies the visible value of the field (which will be read-only). The SOURCE value will be hidden, and the pair of values can only be changed via a pop-up search page. The TARGET end-point will be supplied with the hidden value.

If an INITIAL end-point is used and the property is a list value, it specifies the visible values in a drop-down list. The INITIAL element's HIDDEN_PROPERTY specifies the corresponding list of hidden values that will be supplied to the TARGET end-point. In this instance, the SOURCE end-point specifies one of the hidden values in the list that should be used as the initial list selection (the corresponding visible value is displayed).

LINK

0..1. Only valid for output fields (those with no TARGET connection end-point). The value of the output field will be used as the text for the hyperlink specified by this LINK element.

If the field is based on a domain which requires a pop-up window then the LINK element can be used to supply parameters to the pop-up page. In this case the LINK element must not have a PAGE_ID attribute specified. See Using the pop-up page for further details.

LABEL

0..1. Allows the label for a FIELD to constructed from a number of sources. If both a LABEL attribute and LABEL child element are specified, the element takes precedence. See LABEL element for more details.

SCRIPT

0..n. A script file associated with this FIELD that contains JavaScript code to be activated in response to the specified event on the field control. See SCRIPT element for more details and limitations on this element usage.