Class sap.ui.ux3.ExactAttributeModule: sap/ui/ux3/ExactAttribute

extends Element

An element for defining attributes and sub-attributes used within the Exact pattern.

Deprecated API:Since version 1.38.

Constructor Summary
new sap.ui.ux3.ExactAttribute(sId?, mSettings?)Constructor for a new ExactAttribute.
Event Summary
supplyAttributes(oControlEvent)A supply function is a handler which is attached to the supplyAttributes event.
Method Summary
sap.ui.ux3.ExactAttribute.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.ExactAttribute with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.ExactAttribute.getMetadata()Returns a metadata object for class sap.ui.ux3.ExactAttribute.
addAttribute(oAttribute)Adds some attribute to the aggregation attributes.
attachSupplyAttributes(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the supplyAttributes event of this sap.ui.ux3.ExactAttribute.
destroyAttributes()Destroys all the attributes in the aggregation attributes.
detachSupplyAttributes(fnFunction, oListener)Detaches event handler fnFunction from the supplyAttributes event of this sap.ui.ux3.ExactAttribute.
fireSupplyAttributes(mArguments?)Fires event supplyAttributes to attached listeners.
getAdditionalData()Gets current value of property additionalData.
getAttributes()Gets content of aggregation attributes.
getAutoActivateSupply()Gets current value of property autoActivateSupply.
getListOrder()Gets current value of property listOrder.
getSelected()Gets current value of property selected.
getShowSubAttributesIndicator()Gets current value of property showSubAttributesIndicator.
getShowSubAttributesIndicator_Computed()See attribute showSubAttributesIndicator
getSupplyActive()Gets current value of property supplyActive.
getText()Gets current value of property text.
getWidth()Gets current value of property width.
indexOfAttribute(oAttribute)Checks for the provided sap.ui.ux3.ExactAttribute in the aggregation attributes.
insertAttribute(oAttribute, iIndex)Inserts a attribute into the aggregation attributes.
removeAllAttributes()Removes all the controls from the aggregation attributes.
removeAttribute(vAttribute)Removes a attribute from the aggregation attributes.
scrollTo(oOAttribute)Scrolls the corresponding list of this attribute until the given direct child attribute is visible.
setAdditionalData(oAdditionalData)Sets a new value for property additionalData.
setAutoActivateSupply(bAutoActivateSupply)Sets a new value for property autoActivateSupply.
setListOrder(sListOrder)Sets a new value for property listOrder.
setProperty(sPropertyName, oValue, bSuppressRerendering)
setSelected(bSelected)Sets a new value for property selected.
setShowSubAttributesIndicator(bShowSubAttributesIndicator)Sets a new value for property showSubAttributesIndicator.
setSupplyActive(bSupplyActive)Sets a new value for property supplyActive.
setText(sText)Sets a new value for property text.
setTooltip(oTooltip)
setWidth(iWidth)Sets a new value for property width.
Constructor Detail
new sap.ui.ux3.ExactAttribute(sId?, mSettings?)
Constructor for a new ExactAttribute.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Element can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Deprecated:
Since version 1.38.
Event Detail
supplyAttributes(oControlEvent)
A supply function is a handler which is attached to the supplyAttributes event. The event is fired when the corresponding ExactAttribute is selected, it was already selected when a handler is attached or function getAttributes() is called.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.ux3.ExactAttribute}oControlEvent.getParameters.attribute The ExactAttribute
Method Detail
sap.ui.ux3.ExactAttribute.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.ExactAttribute 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.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.ux3.ExactAttribute.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.ExactAttribute.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAttribute(oAttribute): sap.ui.ux3.ExactAttribute
Adds some attribute to the aggregation attributes.
Parameters:
{sap.ui.ux3.ExactAttribute}oAttribute the attribute to add; if empty, nothing is inserted
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
attachSupplyAttributes(oData?, fnFunction, oListener?): sap.ui.ux3.ExactAttribute
Attaches event handler fnFunction to the supplyAttributes event of this sap.ui.ux3.ExactAttribute.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.ux3.ExactAttribute itself.

A supply function is a handler which is attached to the supplyAttributes event. The event is fired when the corresponding ExactAttribute is selected, it was already selected when a handler is attached or function getAttributes() is called.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.ux3.ExactAttribute itself
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
destroyAttributes(): sap.ui.ux3.ExactAttribute
Destroys all the attributes in the aggregation attributes.
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
detachSupplyAttributes(fnFunction, oListener): sap.ui.ux3.ExactAttribute
Detaches event handler fnFunction from the supplyAttributes event of this sap.ui.ux3.ExactAttribute.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
fireSupplyAttributes(mArguments?): sap.ui.ux3.ExactAttribute
Fires event supplyAttributes to attached listeners.

Expects the following event parameters:

  • attribute of type sap.ui.ux3.ExactAttributeThe ExactAttribute
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
getAdditionalData(): object
Gets current value of property additionalData.

An example for additional data are database keys

Returns:
{object} Value of property additionalData
getAttributes(): sap.ui.ux3.ExactAttribute[]
Gets content of aggregation attributes.

Values (sub attributes) of this attribute

Returns:
{sap.ui.ux3.ExactAttribute[]}
getAutoActivateSupply(): boolean
Gets current value of property autoActivateSupply.

If you want the supply function to be called on every select, you can set the autoActivateSupply attribute to true. In this case, supplyActive is automatically set to true on every unselect.

Default value is false.

Returns:
{boolean} Value of property autoActivateSupply
getListOrder(): sap.ui.ux3.ExactOrder
Gets current value of property listOrder.

The order how the sublists of this attribute should be displayed.

Default value is Select.

Since:
1.7.1
Returns:
{sap.ui.ux3.ExactOrder} Value of property listOrder
getSelected(): boolean
Gets current value of property selected.

Specifies whether the attribute shall be selected

Returns:
{boolean} Value of property selected
getShowSubAttributesIndicator(): boolean
Gets current value of property showSubAttributesIndicator.

Specifies whether the attribute shall have sub values for visual purposes. The indicator which is a little arrow beside an attribute in the list is computed automatically (getShowSubAttributesIndicator_Computed() of sap.ui.ux3.ExactAttribute). In the case that a supply function is attached, and the supplyActive attribute has value 'true', then the Exact pattern needs a hint if sub attributes are available. The showSubAttributesIndicator attribute is considered then and has to be maintained. If the back-end does not support count-calls, for example, showSubAttributesIndicator should be set to true.

Default value is true.

Returns:
{boolean} Value of property showSubAttributesIndicator
getShowSubAttributesIndicator_Computed(): void
See attribute showSubAttributesIndicator
getSupplyActive(): boolean
Gets current value of property supplyActive.

The supplyAttributes event is only fired if supplyActive has value true which is the default. After firing the event, the attribute is automatically set to false. The idea is that a supply function is called only once when the data is requested. To enable the event again it is possible to manually set the attribute back to true.

Default value is true.

Returns:
{boolean} Value of property supplyActive
getText(): string
Gets current value of property text.

The attribute name

Returns:
{string} Value of property text
getWidth(): int
Gets current value of property width.

Specifies the width of the corresponding list in pixels. The value must be between 70 and 500.

Default value is 168.

Since:
1.7.0
Returns:
{int} Value of property width
indexOfAttribute(oAttribute): int
Checks for the provided sap.ui.ux3.ExactAttribute in the aggregation attributes. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.ux3.ExactAttribute}oAttribute The attribute whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertAttribute(oAttribute, iIndex): sap.ui.ux3.ExactAttribute
Inserts a attribute into the aggregation attributes.
Parameters:
{sap.ui.ux3.ExactAttribute}oAttribute the attribute to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the attribute should be inserted at; for a negative value of iIndex, the attribute is inserted at position 0; for a value greater than the current size of the aggregation, the attribute is inserted at the last position
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
removeAllAttributes(): sap.ui.ux3.ExactAttribute[]
Removes all the controls from the aggregation attributes.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.ux3.ExactAttribute[]} An array of the removed elements (might be empty)
removeAttribute(vAttribute): sap.ui.ux3.ExactAttribute
Removes a attribute from the aggregation attributes.
Parameters:
{int|string|sap.ui.ux3.ExactAttribute}vAttribute The attributeto remove or its index or id
Returns:
{sap.ui.ux3.ExactAttribute} The removed attribute or null
scrollTo(oOAttribute): void
Scrolls the corresponding list of this attribute until the given direct child attribute is visible. If the corresponding list is not yet visible the call is buffered until the list is available.
Parameters:
{sap.ui.ux3.ExactAttribute}oOAttribute The direct child attribute
setAdditionalData(oAdditionalData): sap.ui.ux3.ExactAttribute
Sets a new value for property additionalData.

An example for additional data are database keys

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

Parameters:
{object}oAdditionalData New value for property additionalData
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
setAutoActivateSupply(bAutoActivateSupply): sap.ui.ux3.ExactAttribute
Sets a new value for property autoActivateSupply.

If you want the supply function to be called on every select, you can set the autoActivateSupply attribute to true. In this case, supplyActive is automatically set to true on every unselect.

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

Default value is false.

Parameters:
{boolean}bAutoActivateSupply New value for property autoActivateSupply
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
setListOrder(sListOrder): sap.ui.ux3.ExactAttribute
Sets a new value for property listOrder.

The order how the sublists of this attribute should be displayed.

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

Default value is Select.

Parameters:
{sap.ui.ux3.ExactOrder}sListOrder New value for property listOrder
Since:
1.7.1
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
setProperty(sPropertyName, oValue, bSuppressRerendering)
Parameters:
{string}sPropertyName
{object}oValue
{boolean}bSuppressRerendering
See:
sap.ui.core.Element.prototype.setProperty
setSelected(bSelected): sap.ui.ux3.ExactAttribute
Sets a new value for property selected.

Specifies whether the attribute shall be selected

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

Parameters:
{boolean}bSelected New value for property selected
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
setShowSubAttributesIndicator(bShowSubAttributesIndicator): sap.ui.ux3.ExactAttribute
Sets a new value for property showSubAttributesIndicator.

Specifies whether the attribute shall have sub values for visual purposes. The indicator which is a little arrow beside an attribute in the list is computed automatically (getShowSubAttributesIndicator_Computed() of sap.ui.ux3.ExactAttribute). In the case that a supply function is attached, and the supplyActive attribute has value 'true', then the Exact pattern needs a hint if sub attributes are available. The showSubAttributesIndicator attribute is considered then and has to be maintained. If the back-end does not support count-calls, for example, showSubAttributesIndicator should be set to true.

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

Default value is true.

Parameters:
{boolean}bShowSubAttributesIndicator New value for property showSubAttributesIndicator
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
setSupplyActive(bSupplyActive): sap.ui.ux3.ExactAttribute
Sets a new value for property supplyActive.

The supplyAttributes event is only fired if supplyActive has value true which is the default. After firing the event, the attribute is automatically set to false. The idea is that a supply function is called only once when the data is requested. To enable the event again it is possible to manually set the attribute back to true.

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

Default value is true.

Parameters:
{boolean}bSupplyActive New value for property supplyActive
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
setText(sText): sap.ui.ux3.ExactAttribute
Sets a new value for property text.

The attribute name

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

Parameters:
{string}sText New value for property text
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining
setTooltip(oTooltip)
Parameters:
{string|sap.ui.core.TooltipBase}oTooltip
See:
sap.ui.core.Element.prototype.setTooltip
setWidth(iWidth): sap.ui.ux3.ExactAttribute
Sets a new value for property width.

Specifies the width of the corresponding list in pixels. The value must be between 70 and 500.

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

Default value is 168.

Parameters:
{int}iWidth New value for property width
Since:
1.7.0
Returns:
{sap.ui.ux3.ExactAttribute} Reference to this in order to allow method chaining