class sap.ui.vbm.Resource

Control sample: sap.ui.vbm.Resource
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vbm/Resource
Application Component: CA-GTF-VBZ

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

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#constructor for a general description of the syntax of the settings object.

new sap.ui.vbm.Resource(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


Properties

Name Type Default Value Description
name string

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

Visibility: public
src string empty string

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.

Visibility: public
value string

Value of the resource. Base64 endode binary.

Visibility: public

Methods Overview

Method Description
sap.ui.vbm.Resource.extend

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.

sap.ui.vbm.Resource.getMetadata

Returns a metadata object for class sap.ui.vbm.Resource.

getName

Gets current value of property name.

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

getSrc

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

getValue

Gets current value of property value.

Value of the resource. Base64 endode binary.

setName

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.

setSrc

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

setValue

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.

sap.ui.vbm.Resource.extend

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.

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

sap.ui.vbm.Resource.getMetadata

Returns a metadata object for class sap.ui.vbm.Resource.

getName

Gets current value of property name.

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

getSrc

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

getValue

Gets current value of property value.

Value of the resource. Base64 endode binary.

setName

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.

Param Type DefaultValue Description
sName string

New value for property name

setSrc

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

Param Type DefaultValue Description
sSrc string ""

New value for property src

setValue

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.

Param Type DefaultValue Description
sValue string

New value for property value