class sap.m.upload.UploadSetItem

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/upload/UploadSetItem
Application Component: CA-UI5-SC

Item that represents one file to be uploaded using the sap.m.upload.UploadSet control.


Constructor

Constructor for a new UploadSetItem.

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.m.upload.UploadSetItem(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new control, will be generated automatically if no ID is provided.

mSettings? object

Initial settings for the new control.


Properties

Name Type Default Value Description
enabledEdit boolean true

Enables or disables the edit button.

Visibility: public
enabledRemove boolean true

Enables or disables the remove button.

Visibility: public
fileName string

Specifies the name of the uploaded file.

Visibility: public
mediaType string

Specifies the MIME type of the file.

Visibility: public
thumbnailUrl string

Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL.

Visibility: public
uploadState sap.m.UploadState

State of the item relevant to its upload process.

Visibility: public
uploadUrl string

URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered.

Since: 1.90.

Visibility: public
url string

Specifies the URL where the file is located.
If the application doesn't provide a value for this property, the icon and the file name are not clickable in sap.m.upload.UploadSet.

Visibility: public
visibleEdit boolean true

Shows or hides the edit button.

Visibility: public
visibleRemove boolean true

Shows or hides the remove button.

Visibility: public

Aggregations

Default Aggregation: attributes

Name Cardinality Type Description
attributes (default) 0..n sap.m.ObjectAttribute

Attributes of the item.

headerFields 0..n sap.ui.core.Item

Header fields to be included in the header section of an XMLHttpRequest (XHR) request

Since: 1.90.

markers 0..n sap.m.ObjectMarker

Markers of the item.

statuses 0..n sap.m.ObjectStatus

Statuses of the item.


Events Overview

Event Description
openPressed

This event is fired when an open action is invoked on an item.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

removePressed

This event is fired when a remove action is invoked on an item.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

openPressed

This event is fired when an open action is invoked on an item.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

removePressed

This event is fired when a remove action is invoked on an item.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
addAttribute

Adds some attribute to the aggregation attributes.

addHeaderField

Adds some headerField to the aggregation headerFields.

addMarker

Adds some marker to the aggregation markers.

addStatus

Adds some status to the aggregation statuses.

attachOpenPressed

Attaches event handler fnFunction to the openPressed event of this sap.m.upload.UploadSetItem.

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.m.upload.UploadSetItem itself.

This event is fired when an open action is invoked on an item.

attachRemovePressed

Attaches event handler fnFunction to the removePressed event of this sap.m.upload.UploadSetItem.

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.m.upload.UploadSetItem itself.

This event is fired when a remove action is invoked on an item.

destroyAttributes

Destroys all the attributes in the aggregation attributes.

destroyHeaderFields

Destroys all the headerFields in the aggregation headerFields.

destroyMarkers

Destroys all the markers in the aggregation markers.

destroyStatuses

Destroys all the statuses in the aggregation statuses.

detachOpenPressed

Detaches event handler fnFunction from the openPressed event of this sap.m.upload.UploadSetItem.

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

detachRemovePressed

Detaches event handler fnFunction from the removePressed event of this sap.m.upload.UploadSetItem.

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

download

Downloads the item. Only possible when the item has a valid URL specified in the url property.

sap.m.upload.UploadSetItem.extend

Creates a new subclass of class sap.m.upload.UploadSetItem 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.

fireOpenPressed

Fires event openPressed to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireRemovePressed

Fires event removePressed to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

getAttributes

Gets content of aggregation attributes.

Attributes of the item.

getEnabledEdit

Gets current value of property enabledEdit.

Enables or disables the edit button.

Default value is true.

getEnabledRemove

Gets current value of property enabledRemove.

Enables or disables the remove button.

Default value is true.

getFileName

Gets current value of property fileName.

Specifies the name of the uploaded file.

getFileObject

Returns file object.

getHeaderFields

Gets content of aggregation headerFields.

Header fields to be included in the header section of an XMLHttpRequest (XHR) request

getListItem

Returns list item.

getMarkers

Gets content of aggregation markers.

Markers of the item.

getMediaType

Gets current value of property mediaType.

Specifies the MIME type of the file.

sap.m.upload.UploadSetItem.getMetadata

Returns a metadata object for class sap.m.upload.UploadSetItem.

getStatuses

Gets content of aggregation statuses.

Statuses of the item.

getThumbnailUrl

Gets current value of property thumbnailUrl.

Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL.

getUploadState

Gets current value of property uploadState.

State of the item relevant to its upload process.

getUploadUrl

Gets current value of property uploadUrl.

URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered.

getUrl

Gets current value of property url.

Specifies the URL where the file is located.
If the application doesn't provide a value for this property, the icon and the file name are not clickable in sap.m.upload.UploadSet.

getVisibleEdit

Gets current value of property visibleEdit.

Shows or hides the edit button.

Default value is true.

getVisibleRemove

Gets current value of property visibleRemove.

Shows or hides the remove button.

Default value is true.

indexOfAttribute

Checks for the provided sap.m.ObjectAttribute in the aggregation attributes. and returns its index if found or -1 otherwise.

indexOfHeaderField

Checks for the provided sap.ui.core.Item in the aggregation headerFields. and returns its index if found or -1 otherwise.

indexOfMarker

Checks for the provided sap.m.ObjectMarker in the aggregation markers. and returns its index if found or -1 otherwise.

indexOfStatus

Checks for the provided sap.m.ObjectStatus in the aggregation statuses. and returns its index if found or -1 otherwise.

insertAttribute

Inserts a attribute into the aggregation attributes.

insertHeaderField

Inserts a headerField into the aggregation headerFields.

insertMarker

Inserts a marker into the aggregation markers.

insertStatus

Inserts a status into the aggregation statuses.

removeAllAttributes

Removes all the controls from the aggregation attributes.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeaderFields

Removes all the controls from the aggregation headerFields.

Additionally, it unregisters them from the hosting UIArea.

removeAllMarkers

Removes all the controls from the aggregation markers.

Additionally, it unregisters them from the hosting UIArea.

removeAllStatuses

Removes all the controls from the aggregation statuses.

Additionally, it unregisters them from the hosting UIArea.

removeAttribute

Removes a attribute from the aggregation attributes.

removeHeaderField

Removes a headerField from the aggregation headerFields.

removeMarker

Removes a marker from the aggregation markers.

removeStatus

Removes a status from the aggregation statuses.

setEnabledEdit

Sets a new value for property enabledEdit.

Enables or disables the edit button.

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

Default value is true.

setEnabledRemove

Sets a new value for property enabledRemove.

Enables or disables the remove button.

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

Default value is true.

setFileName

Sets a new value for property fileName.

Specifies the name of the uploaded file.

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

setMediaType

Sets a new value for property mediaType.

Specifies the MIME type of the file.

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

setProgress

Set current progress.

setThumbnailUrl

Sets a new value for property thumbnailUrl.

Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL.

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

setUploadState

Sets a new value for property uploadState.

State of the item relevant to its upload process.

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

setUploadUrl

Sets a new value for property uploadUrl.

URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered.

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

setUrl

Sets a new value for property url.

Specifies the URL where the file is located.
If the application doesn't provide a value for this property, the icon and the file name are not clickable in sap.m.upload.UploadSet.

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

setVisibleEdit

Sets a new value for property visibleEdit.

Shows or hides the edit button.

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

Default value is true.

setVisibleRemove

Sets a new value for property visibleRemove.

Shows or hides the remove button.

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

Default value is true.

addAttribute

Adds some attribute to the aggregation attributes.

Param Type DefaultValue Description
oAttribute sap.m.ObjectAttribute

The attribute to add; if empty, nothing is inserted

addHeaderField

Adds some headerField to the aggregation headerFields.

Param Type DefaultValue Description
oHeaderField sap.ui.core.Item

The headerField to add; if empty, nothing is inserted

addMarker

Adds some marker to the aggregation markers.

Param Type DefaultValue Description
oMarker sap.m.ObjectMarker

The marker to add; if empty, nothing is inserted

addStatus

Adds some status to the aggregation statuses.

Param Type DefaultValue Description
oStatus sap.m.ObjectStatus

The status to add; if empty, nothing is inserted

attachOpenPressed

Attaches event handler fnFunction to the openPressed event of this sap.m.upload.UploadSetItem.

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.m.upload.UploadSetItem itself.

This event is fired when an open action is invoked on an item.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSetItem itself

attachRemovePressed

Attaches event handler fnFunction to the removePressed event of this sap.m.upload.UploadSetItem.

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.m.upload.UploadSetItem itself.

This event is fired when a remove action is invoked on an item.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSetItem itself

destroyAttributes

Destroys all the attributes in the aggregation attributes.

destroyHeaderFields

Destroys all the headerFields in the aggregation headerFields.

destroyMarkers

Destroys all the markers in the aggregation markers.

destroyStatuses

Destroys all the statuses in the aggregation statuses.

detachOpenPressed

Detaches event handler fnFunction from the openPressed event of this sap.m.upload.UploadSetItem.

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

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachRemovePressed

Detaches event handler fnFunction from the removePressed event of this sap.m.upload.UploadSetItem.

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

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

download

Downloads the item. Only possible when the item has a valid URL specified in the url property.

Param Type DefaultValue Description
bAskForLocation boolean

Whether to ask for a location where to download the file or not.

sap.m.upload.UploadSetItem.extend

Creates a new subclass of class sap.m.upload.UploadSetItem 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

fireOpenPressed

Fires event openPressed to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireRemovePressed

Fires event removePressed to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getAttributes

Gets content of aggregation attributes.

Attributes of the item.

getEnabledEdit

Gets current value of property enabledEdit.

Enables or disables the edit button.

Default value is true.

getEnabledRemove

Gets current value of property enabledRemove.

Enables or disables the remove button.

Default value is true.

getFileName

Gets current value of property fileName.

Specifies the name of the uploaded file.

getFileObject

Returns file object.

getHeaderFields

Gets content of aggregation headerFields.

Header fields to be included in the header section of an XMLHttpRequest (XHR) request

getListItem

Returns list item.

getMarkers

Gets content of aggregation markers.

Markers of the item.

getMediaType

Gets current value of property mediaType.

Specifies the MIME type of the file.

sap.m.upload.UploadSetItem.getMetadata

Returns a metadata object for class sap.m.upload.UploadSetItem.

getStatuses

Gets content of aggregation statuses.

Statuses of the item.

getThumbnailUrl

Gets current value of property thumbnailUrl.

Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL.

getUploadState

Gets current value of property uploadState.

State of the item relevant to its upload process.

getUploadUrl

Gets current value of property uploadUrl.

URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered.

getUrl

Gets current value of property url.

Specifies the URL where the file is located.
If the application doesn't provide a value for this property, the icon and the file name are not clickable in sap.m.upload.UploadSet.

getVisibleEdit

Gets current value of property visibleEdit.

Shows or hides the edit button.

Default value is true.

getVisibleRemove

Gets current value of property visibleRemove.

Shows or hides the remove button.

Default value is true.

indexOfAttribute

Checks for the provided sap.m.ObjectAttribute in the aggregation attributes. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAttribute sap.m.ObjectAttribute

The attribute whose index is looked for

indexOfHeaderField

Checks for the provided sap.ui.core.Item in the aggregation headerFields. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oHeaderField sap.ui.core.Item

The headerField whose index is looked for

indexOfMarker

Checks for the provided sap.m.ObjectMarker in the aggregation markers. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oMarker sap.m.ObjectMarker

The marker whose index is looked for

indexOfStatus

Checks for the provided sap.m.ObjectStatus in the aggregation statuses. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oStatus sap.m.ObjectStatus

The status whose index is looked for

insertAttribute

Inserts a attribute into the aggregation attributes.

Param Type DefaultValue Description
oAttribute sap.m.ObjectAttribute

The attribute to insert; if empty, nothing is inserted

iIndex int

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

insertHeaderField

Inserts a headerField into the aggregation headerFields.

Param Type DefaultValue Description
oHeaderField sap.ui.core.Item

The headerField to insert; if empty, nothing is inserted

iIndex int

The 0-based index the headerField should be inserted at; for a negative value of iIndex, the headerField is inserted at position 0; for a value greater than the current size of the aggregation, the headerField is inserted at the last position

insertMarker

Inserts a marker into the aggregation markers.

Param Type DefaultValue Description
oMarker sap.m.ObjectMarker

The marker to insert; if empty, nothing is inserted

iIndex int

The 0-based index the marker should be inserted at; for a negative value of iIndex, the marker is inserted at position 0; for a value greater than the current size of the aggregation, the marker is inserted at the last position

insertStatus

Inserts a status into the aggregation statuses.

Param Type DefaultValue Description
oStatus sap.m.ObjectStatus

The status to insert; if empty, nothing is inserted

iIndex int

The 0-based index the status should be inserted at; for a negative value of iIndex, the status is inserted at position 0; for a value greater than the current size of the aggregation, the status is inserted at the last position

removeAllAttributes

Removes all the controls from the aggregation attributes.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeaderFields

Removes all the controls from the aggregation headerFields.

Additionally, it unregisters them from the hosting UIArea.

removeAllMarkers

Removes all the controls from the aggregation markers.

Additionally, it unregisters them from the hosting UIArea.

removeAllStatuses

Removes all the controls from the aggregation statuses.

Additionally, it unregisters them from the hosting UIArea.

removeAttribute

Removes a attribute from the aggregation attributes.

Param Type DefaultValue Description
vAttribute int string sap.m.ObjectAttribute

The attribute to remove or its index or id

removeHeaderField

Removes a headerField from the aggregation headerFields.

Param Type DefaultValue Description
vHeaderField int string sap.ui.core.Item

The headerField to remove or its index or id

removeMarker

Removes a marker from the aggregation markers.

Param Type DefaultValue Description
vMarker int string sap.m.ObjectMarker

The marker to remove or its index or id

removeStatus

Removes a status from the aggregation statuses.

Param Type DefaultValue Description
vStatus int string sap.m.ObjectStatus

The status to remove or its index or id

setEnabledEdit

Sets a new value for property enabledEdit.

Enables or disables the edit button.

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
bEnabledEdit boolean true

New value for property enabledEdit

setEnabledRemove

Sets a new value for property enabledRemove.

Enables or disables the remove button.

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
bEnabledRemove boolean true

New value for property enabledRemove

setFileName

Sets a new value for property fileName.

Specifies the name of the uploaded file.

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

Param Type DefaultValue Description
sFileName string

New value for property fileName

setMediaType

Sets a new value for property mediaType.

Specifies the MIME type of the file.

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

Param Type DefaultValue Description
sMediaType string

New value for property mediaType

setProgress

Set current progress.

Param Type DefaultValue Description
iProgress int

Current progress.

setThumbnailUrl

Sets a new value for property thumbnailUrl.

Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL.

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

Param Type DefaultValue Description
sThumbnailUrl string

New value for property thumbnailUrl

setUploadState

Sets a new value for property uploadState.

State of the item relevant to its upload process.

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

Param Type DefaultValue Description
sUploadState sap.m.UploadState

New value for property uploadState

setUploadUrl

Sets a new value for property uploadUrl.

URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered.

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

Param Type DefaultValue Description
sUploadUrl string

New value for property uploadUrl

setUrl

Sets a new value for property url.

Specifies the URL where the file is located.
If the application doesn't provide a value for this property, the icon and the file name are not clickable in sap.m.upload.UploadSet.

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

Param Type DefaultValue Description
sUrl string

New value for property url

setVisibleEdit

Sets a new value for property visibleEdit.

Shows or hides the edit button.

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
bVisibleEdit boolean true

New value for property visibleEdit

setVisibleRemove

Sets a new value for property visibleRemove.

Shows or hides the remove button.

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
bVisibleRemove boolean true

New value for property visibleRemove