Class sap.ui.vbm.ResourceModule: sap/ui/vbm/Resource

extends Element

A resource is a Base64 encoded representation of an image binary that can be referenced by name in e.g. a Spot element. When images are specified as a string resource it is guaranteed that the control can access the bits in the image. If just a URL to the resource is given it is loaded and converted to a Base64 encoded binary. This happens asynchronously and it may require several re-renderings of the control until all resource show up correctly.

Constructor Summary
new sap.ui.vbm.Resource(sId?, mSettings?)Constructor for a new Resource.
Method Summary
sap.ui.vbm.Resource.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vbm.Resource with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.vbm.Resource.getMetadata()Returns a metadata object for class sap.ui.vbm.Resource.
getName()Gets current value of property name.
getSrc()Gets current value of property src.
getValue()Gets current value of property value.
setName(sName)Sets a new value for property name.
setSrc(sSrc)Sets a new value for property src.
setValue(sValue)Sets a new value for property value.
Constructor Detail
new sap.ui.vbm.Resource(sId?, mSettings?)
Constructor for a new Resource.

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:

  • Properties

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
Method Detail
sap.ui.vbm.Resource.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.vbm.Resource 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.vbm.Resource.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.vbm.Resource.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getName(): string
Gets current value of property name.

Name of the resource. The name should be always used when a resource is referenced.

Returns:
{string} Value of property name
getSrc(): string
Gets current value of property src.

URL to an image. It is important that the image data is readable fom the visual business control. Therefore e.g. images coming from a local drive or cross domains are not allowed. The preferred way is to use the Base64 encoded data provided using the value property.

Default value is .

Returns:
{string} Value of property src
getValue(): string
Gets current value of property value.

Value of the resource. Base64 endode binary.

Returns:
{string} Value of property value
setName(sName): sap.ui.vbm.Resource
Sets a new value for property name.

Name of the resource. The name should be always used when a resource is referenced.

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

Parameters:
{string}sName New value for property name
Returns:
{sap.ui.vbm.Resource} Reference to this in order to allow method chaining
setSrc(sSrc): sap.ui.vbm.Resource
Sets a new value for property src.

URL to an image. It is important that the image data is readable fom the visual business control. Therefore e.g. images coming from a local drive or cross domains are not allowed. The preferred way is to use the Base64 encoded data provided using the value property.

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

Default value is .

Parameters:
{string}sSrc New value for property src
Returns:
{sap.ui.vbm.Resource} Reference to this in order to allow method chaining
setValue(sValue): sap.ui.vbm.Resource
Sets a new value for property value.

Value of the resource. Base64 endode binary.

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

Parameters:
{string}sValue New value for property value
Returns:
{sap.ui.vbm.Resource} Reference to this in order to allow method chaining