A SemanticFormElement
element is a special FormElement
that contains semantically connected fields. These field controls are divided by delimiter controls. In display mode, they are rendered as one condensed string, in edit mode as separate fields.
Note: Please use the ColumnLayout
as layout
of the Form
. For other layouts, the field arrangement might not be suitable in every case.
Constructor for a new sap.ui.layout.form.SemanticFormElement.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.layout.form.SemanticFormElement(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | Initial settings for the new control |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_delimiters | 0..n | sap.ui.core.Control | |
_displayField | 0..1 | sap.ui.core.Control | |
fieldLabels | 0..n | sap.ui.core.Label |
Labels of the individual fields. Can either be a If a These labels are not rendered directly. If the Note: If this aggregation is used, a label is assigned to every single field of |
Name | Cardinality | Type | Description |
---|---|---|---|
fields | 0..n | sap.ui.core.Control |
Form controls that belong together to be displayed in one row of a Warning: Do not put any layout or other container controls in here. This could damage the visual layout, keyboard support and screen-reader support. Only form controls are allowed. Views are also not supported. Allowed controls implement the interface |
label | 0..1 | sap.ui.core.Label |
Label of the fields. Can either be a |
Method | Description |
---|---|
addFieldLabel |
Adds some fieldLabel to the aggregation fieldLabels. |
destroyFieldLabels |
Destroys all the fieldLabels in the aggregation fieldLabels. |
sap.ui.layout.form.SemanticFormElement.extend |
Creates a new subclass of class sap.ui.layout.form.SemanticFormElement with name
|
getDelimiter |
Gets current value of property delimiter. Delimiter symbol to separate the fields. Default value is |
getFieldLabels |
Gets content of aggregation fieldLabels. Labels of the individual fields. Can either be a If a These labels are not rendered directly. If the Note: If this aggregation is used, a label is assigned to every single field of |
getFieldsForRendering |
Determines which fields are rendered. In edit mode, the field controls are rendered separated by the delimiters. In display mode, one text is rendered. |
sap.ui.layout.form.SemanticFormElement.getMetadata |
Returns a metadata object for class sap.ui.layout.form.SemanticFormElement. |
indexOfFieldLabel |
Checks for the provided |
insertFieldLabel |
Inserts a fieldLabel into the aggregation fieldLabels. |
removeAllFieldLabels |
Removes all the controls from the aggregation fieldLabels. Additionally, it unregisters them from the hosting UIArea. |
removeFieldLabel |
Removes a fieldLabel from the aggregation fieldLabels. |
setDelimiter |
Sets a new value for property delimiter. Delimiter symbol to separate the fields. When called with a value of Default value is |
Adds some fieldLabel to the aggregation fieldLabels.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFieldLabel | sap.ui.core.Label |
The fieldLabel to add; if empty, nothing is inserted |
Creates a new subclass of class sap.ui.layout.form.SemanticFormElement with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.layout.form.FormElement.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Gets current value of property delimiter.
Delimiter symbol to separate the fields.
Default value is "/"
.
Gets content of aggregation fieldLabels.
Labels of the individual fields. Can either be a Label
control or a string.
If a Label
control is used, the properties of the Label
can be set.
These labels are not rendered directly. If the Label
property of SemanticFormElement
is not set, the texts of the labels are concatenated into the Label
property of SemanticFormElement
. Otherwise the set Label
is shown.
Note: If this aggregation is used, a label is assigned to every single field of SemanticFormElement
. The order of the labels and the fields must be the same.
Determines which fields are rendered.
In edit mode, the field controls are rendered separated by the delimiters. In display mode, one text is rendered.
Returns a metadata object for class sap.ui.layout.form.SemanticFormElement.
Checks for the provided sap.ui.core.Label
in the aggregation fieldLabels. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFieldLabel | sap.ui.core.Label |
The fieldLabel whose index is looked for |
Inserts a fieldLabel into the aggregation fieldLabels.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFieldLabel | sap.ui.core.Label |
The fieldLabel to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation fieldLabels.
Additionally, it unregisters them from the hosting UIArea.
Removes a fieldLabel from the aggregation fieldLabels.
Param | Type | DefaultValue | Description |
---|---|---|---|
vFieldLabel | int string sap.ui.core.Label |
The fieldLabel to remove or its index or id |
Sets a new value for property delimiter.
Delimiter symbol to separate the fields.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "/"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDelimiter | string | "/" |
New value for property |