layoutField

Extends: layoutFlowElement
Namespace: (default namespace)
XML Schema: vcac-service-catalog-rest-schema.xsd

Represents a field for presentation layout. Applicable to both simple fields and structured, non primitive fields having nested sub-fields. Structured fields have data of type ComplexDataType or EntityReferenceDataType.

A key difference between the 2 structured types is that the sub-fields of a complex field may be editable. When the data in a form is collected, these sub-field values are added to the map with the complex value. However, the sub-fields of an entity reference are NEVER editable. The entity reference (or list thereof) may be manipulated by a complex layout field, but the sub-fields are only ever displayed for informational purposes. (NOTE: The API for retrieving these entity reference sub-fields is TBD.)

A complex layout field may be used to represent a multi-valued field. Therefore, the rendering of this field in an editable context should provide commands to add and remove values from the list. In the case of entity references, the act of adding must incorporate some form of search/selection of an specific, existing entity reference to add to the list. This list is driven by the permissible values list defined for the object field. (At this time, permissible values is not supported for complex data types.) The number of values collected must satisfy any min- and max- cardinality constraints defined for the object field.

How the data is displayed, is still dictated by the display advice . The values relevant to this element include:

For tabular displays (DisplayAdvice#DATA_TABLE and DisplayAdvice#MASTER_DETAILS ), the columns are specified by the columns property. Each column is represented using the existing LayoutField definition. Here, the LayoutField#getSize() should be interpreted as relative width for the column, compared to the columns.

For displays using an additional layout (DisplayAdvice#EMBEDDED_LAYOUT and DisplayAdvice#MASTER_DETAILS), this layout is specified by the detail layout property.

Both the columns and detail layouts contain fields with their own field paths. These paths are interpreted to be relative to the parent, object field. E.g. The object field "request.vms" may have columns "cpu" and "memory". These sub-field paths are NOT prefixed with the parent field path.

This layout element IS a {link LayoutCell}. That means it can appear in a LayoutRow adjacent to LayoutFields and other similar elements. The #getSize() property of this element should be respected in those instances.

XML

Attributes

name type description
id string The id of the field.
isMultiValued boolean A flag to represent if the field can contain multiple, nested values.
displayAdvice displayAdvice Stores advice and how to display the field.
labelSize int The field's label size. The label size is interpreted by the renderer, currently as a column span in the layout rendering tables.

This field can be null (which would then use size defaults)

Elements

name (type) min/max
occurs
description
label (string) 0/1 The user-friendly label of the field.
description (string) 0/1 A description of the field.
dataType (dataType) 0/1 The data type of the field.
permissibleValues (permissibleValueList) 0/1 Stores possible values of this field. NOTE: Not supported in for complex data types.
state (state) 0/1 The ElementState of the field.
columns/column (layoutField) 0/unbounded Future: Create a binding facet which auto-populates the values of the field based on a separate selection in the form. E.g. selecting vApp Template X creates a separate value in this field for each VM, collecting per-VM customization instructions like CPU, Memory, name etc.
detailLayout (layoutRef) 0/1 A layout used to present individual values (or rows) within this field to support a master-detail view or offering a dialog when editing a row.

JSON

property type description
id string The id of the field.
isMultiValued boolean A flag to represent if the field can contain multiple, nested values.
displayAdvice displayAdvice Stores advice and how to display the field.
labelSize int The field's label size. The label size is interpreted by the renderer, currently as a column span in the layout rendering tables.

This field can be null (which would then use size defaults)

label label (string) The user-friendly label of the field.
description description (string) A description of the field.
dataType dataType (dataType) The data type of the field.
permissibleValues permissibleValues (permissibleValueList) Stores possible values of this field. NOTE: Not supported in for complex data types.
state state (state) The ElementState of the field.
columns array of columns/column (layoutField) Future: Create a binding facet which auto-populates the values of the field based on a separate selection in the form. E.g. selecting vApp Template X creates a separate value in this field for each VM, collecting per-VM customization instructions like CPU, Memory, name etc.
detailLayout detailLayout (layoutRef) A layout used to present individual values (or rows) within this field to support a master-detail view or offering a dialog when editing a row.