Represents a data column for a sap.ui.vtm.Tree.
Constructor for a new Column.
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.vtm.Column(sId, mSettings)
Param | Type | Default Value | Description |
---|---|---|---|
sId | string | An optional ID for the sap.ui.vtm.Column. |
|
mSettings | object | An optional object with initial settings for the new sap.ui.vtm.Column instance. |
Name | Type | Default Value | Description |
---|---|---|---|
descriptor | string | The descriptor is a JSON string identifying the column. When the type property has a value of sap.ui.vtm.ColumnType.Metadata the descriptor property has the following form: When the type property has a value of sap.ui.vtm.ColumnType.Identifier the descriptor property has the following form: When the type property has a value of sap.ui.vtm.ColumnType.AppData the descriptor property has the following form: |
|
hAlign | sap.ui.core.HorizontalAlign | Left | The horizontal alignment for the tree column. Visibility: public |
label | string | A textual name for the column. This is also used in the sap.ui.vtm.ColumnSelectionDialog, so it should be included whether or not the |
|
labelControl | object | A sap.ui.core.Control that is used in the column header. When specified, this is used in preference to the |
|
resizable | boolean | true | If set to true, the column can be resized. Visibility: public |
template | sap.ui.core.Control | If defined, overrides the cell template for the column. |
|
tooltip | string | A localized string to show in the column header tooltip. If unspecified, the label value will be used as the column header tooltip. Visibility: public |
|
tooltipFormatter | any | If defined, this is a function that specifies the formatting of cell content tooltips for this column (overriding the default behaviour). |
|
type | sap.ui.vtm.ColumnType | The type of column. Visibility: public |
|
valueFormatter | any | If defined, this is a function that specifies the formatting of cell content text for this column. |
|
width | sap.ui.core.CSSSize | 200px | The width of the tree column. Visibility: public |
Method | Description |
---|---|
sap.ui.vtm.Column.extend |
Creates a new subclass of class sap.ui.vtm.Column with name
|
getDescriptor |
Gets current value of property descriptor. The descriptor is a JSON string identifying the column. When the type property has a value of sap.ui.vtm.ColumnType.Metadata the descriptor property has the following form: When the type property has a value of sap.ui.vtm.ColumnType.Identifier the descriptor property has the following form: When the type property has a value of sap.ui.vtm.ColumnType.AppData the descriptor property has the following form: |
getHAlign |
Gets current value of property hAlign. The horizontal alignment for the tree column. Default value is |
getLabel |
Gets current value of property label. A textual name for the column. This is also used in the sap.ui.vtm.ColumnSelectionDialog, so it should be included whether or not the |
getLabelControl |
Gets current value of property labelControl. A sap.ui.core.Control that is used in the column header. When specified, this is used in preference to the |
sap.ui.vtm.Column.getMetadata |
Returns a metadata object for class sap.ui.vtm.Column. |
getResizable |
Gets current value of property resizable. If set to true, the column can be resized. Default value is |
getTemplate |
Gets current value of property template. If defined, overrides the cell template for the column. |
getTooltip |
Gets current value of property tooltip. A localized string to show in the column header tooltip. If unspecified, the label value will be used as the column header tooltip. |
getTooltipFormatter |
Gets current value of property tooltipFormatter. If defined, this is a function that specifies the formatting of cell content tooltips for this column (overriding the default behaviour). |
getType |
Gets current value of property type. The type of column. |
getValueFormatter |
Gets current value of property valueFormatter. If defined, this is a function that specifies the formatting of cell content text for this column. |
getWidth |
Gets current value of property width. The width of the tree column. Default value is |
setDescriptor |
Sets a new value for property descriptor. The descriptor is a JSON string identifying the column. When the type property has a value of sap.ui.vtm.ColumnType.Metadata the descriptor property has the following form: When the type property has a value of sap.ui.vtm.ColumnType.Identifier the descriptor property has the following form: When the type property has a value of sap.ui.vtm.ColumnType.AppData the descriptor property has the following form: When called with a value of |
setHAlign |
Sets a new value for property hAlign. The horizontal alignment for the tree column. When called with a value of Default value is |
setLabel |
Sets a new value for property label. A textual name for the column. This is also used in the sap.ui.vtm.ColumnSelectionDialog, so it should be included whether or not the When called with a value of |
setLabelControl |
Sets a new value for property labelControl. A sap.ui.core.Control that is used in the column header. When specified, this is used in preference to the When called with a value of |
setResizable |
Sets a new value for property resizable. If set to true, the column can be resized. When called with a value of Default value is |
setTemplate |
Sets a new value for property template. If defined, overrides the cell template for the column. When called with a value of |
setTooltip |
Sets a new value for property tooltip. A localized string to show in the column header tooltip. If unspecified, the label value will be used as the column header tooltip. When called with a value of |
setTooltipFormatter |
Sets a new value for property tooltipFormatter. If defined, this is a function that specifies the formatting of cell content tooltips for this column (overriding the default behaviour). When called with a value of |
setType |
Sets a new value for property type. The type of column. When called with a value of |
setValueFormatter |
Sets a new value for property valueFormatter. If defined, this is a function that specifies the formatting of cell content text for this column. When called with a value of |
setWidth |
Sets a new value for property width. The width of the tree column. When called with a value of Default value is |
Creates a new subclass of class sap.ui.vtm.Column 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.core.Element.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 descriptor.
The descriptor is a JSON string identifying the column.
When the type property has a value of sap.ui.vtm.ColumnType.Metadata the descriptor property has the following form: '{"category":"SAP","field":"MATERIAL"}'
Such descriptors can be constructed using sap.ui.vtm.DescriptorUtilities.createMetadataDescriptor.
When the type property has a value of sap.ui.vtm.ColumnType.Identifier the descriptor property has the following form: '{"source":"SAP","type":"VE_COMPONENT"}'
Such descriptors can be constructed using sap.ui.vtm.DescriptorUtilities.createIdentifierDescriptor.
When the type property has a value of sap.ui.vtm.ColumnType.AppData the descriptor property has the following form: 'bomId'
Gets current value of property hAlign.
The horizontal alignment for the tree column.
Default value is "Left"
.
Gets current value of property label.
A textual name for the column. This is also used in the sap.ui.vtm.ColumnSelectionDialog, so it should be included whether or not the labelControl
property is used.
Gets current value of property labelControl.
A sap.ui.core.Control that is used in the column header. When specified, this is used in preference to the label
property as the column header content. However the label
property should also be specified since it is used in the used in the sap.ui.vtm.ColumnSelectionDialog.
Gets current value of property resizable.
If set to true, the column can be resized.
Default value is true
.
Gets current value of property template.
If defined, overrides the cell template for the column.
If this is defined, the valueFormatter
and tooltipFormatter
properties are ignored.
Gets current value of property tooltip.
A localized string to show in the column header tooltip. If unspecified, the label value will be used as the column header tooltip.
Gets current value of property tooltipFormatter.
If defined, this is a function that specifies the formatting of cell content tooltips for this column (overriding the default behaviour).
Not used if a custom template is specified.
The function must return a string containing the text to display in the tooltip (or null) for a given tree item.
The first parameter to the function (which may not always be defined) is the tree item for the tree table row.
Gets current value of property valueFormatter.
If defined, this is a function that specifies the formatting of cell content text for this column.
The function must return a string containing the text to display in the cell (or null) for a given tree item.
The first parameter to the function (which may not always be defined) is the tree item for the tree table row.
Gets current value of property width.
The width of the tree column.
Default value is "200px"
.
Sets a new value for property descriptor.
The descriptor is a JSON string identifying the column.
When the type property has a value of sap.ui.vtm.ColumnType.Metadata the descriptor property has the following form: '{"category":"SAP","field":"MATERIAL"}'
Such descriptors can be constructed using sap.ui.vtm.DescriptorUtilities.createMetadataDescriptor.
When the type property has a value of sap.ui.vtm.ColumnType.Identifier the descriptor property has the following form: '{"source":"SAP","type":"VE_COMPONENT"}'
Such descriptors can be constructed using sap.ui.vtm.DescriptorUtilities.createIdentifierDescriptor.
When the type property has a value of sap.ui.vtm.ColumnType.AppData the descriptor property has the following form: 'bomId'
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDescriptor | string |
New value for property |
Sets a new value for property hAlign.
The horizontal alignment for the tree column.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "Left"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHAlign | sap.ui.core.HorizontalAlign | "Left" |
New value for property |
Sets a new value for property label.
A textual name for the column. This is also used in the sap.ui.vtm.ColumnSelectionDialog, so it should be included whether or not the labelControl
property is used.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sLabel | string |
New value for property |
Sets a new value for property labelControl.
A sap.ui.core.Control that is used in the column header. When specified, this is used in preference to the label
property as the column header content. However the label
property should also be specified since it is used in the used in the sap.ui.vtm.ColumnSelectionDialog.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oLabelControl | object |
New value for property |
Sets a new value for property resizable.
If set to true, the column can be resized.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bResizable | boolean | true |
New value for property |
Sets a new value for property template.
If defined, overrides the cell template for the column.
If this is defined, the valueFormatter
and tooltipFormatter
properties are ignored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTemplate | sap.ui.core.Control |
New value for property |
Sets a new value for property tooltip.
A localized string to show in the column header tooltip. If unspecified, the label value will be used as the column header tooltip.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTooltip | string |
New value for property |
Sets a new value for property tooltipFormatter.
If defined, this is a function that specifies the formatting of cell content tooltips for this column (overriding the default behaviour).
Not used if a custom template is specified.
The function must return a string containing the text to display in the tooltip (or null) for a given tree item.
The first parameter to the function (which may not always be defined) is the tree item for the tree table row.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oTooltipFormatter | any |
New value for property |
Sets a new value for property type.
The type of column.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.vtm.ColumnType |
New value for property |
Sets a new value for property valueFormatter.
If defined, this is a function that specifies the formatting of cell content text for this column.
The function must return a string containing the text to display in the cell (or null) for a given tree item.
The first parameter to the function (which may not always be defined) is the tree item for the tree table row.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oValueFormatter | any |
New value for property |
Sets a new value for property width.
The width of the tree column.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "200px"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize | "200px" |
New value for property |