class sap.ui.vtm.Column

Control sample: sap.ui.vtm.Column
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vtm/Column
Application Component:

Represents a data column for a sap.ui.vtm.Tree.


Constructor

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.


Properties

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: '{"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'

Visibility: public
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 property is used.

Visibility: public
labelControl object

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.

Visibility: public
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.
If this is defined, the valueFormatter and tooltipFormatter properties are ignored.

Visibility: public
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).
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.

Visibility: public
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.
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.

Visibility: public
width sap.ui.core.CSSSize 200px

The width of the tree column.

Visibility: public

Methods Overview

Method Description
sap.ui.vtm.Column.extend

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.

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: '{"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'

getHAlign

Gets current value of property hAlign.

The horizontal alignment for the tree column.

Default value is "Left".

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 labelControl property is used.

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 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.

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 true.

getTemplate

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.

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).
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.

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.
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.

getWidth

Gets current value of property width.

The width of the tree column.

Default value is "200px".

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: '{"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.

setHAlign

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".

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 labelControl property is used.

When called with a value of null or undefined, the default value of the property will be restored.

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 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.

setResizable

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.

setTemplate

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.

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 null or undefined, the default value of the property will be restored.

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).
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.

setType

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.

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.
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.

setWidth

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".

sap.ui.vtm.Column.extend

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

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: '{"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'

getHAlign

Gets current value of property hAlign.

The horizontal alignment for the tree column.

Default value is "Left".

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 labelControl property is used.

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 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.

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 true.

getTemplate

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.

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).
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.

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.
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.

getWidth

Gets current value of property width.

The width of the tree column.

Default value is "200px".

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: '{"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 descriptor

setHAlign

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 hAlign

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 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 label

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 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 labelControl

setResizable

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 resizable

setTemplate

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 template

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 null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sTooltip string

New value for property tooltip

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).
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 tooltipFormatter

setType

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 type

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.
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 valueFormatter

setWidth

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 width