Class sap.m.UploadCollectionItemModule: sap/m/UploadCollectionItem

extends Element

Items provide information about the uploaded files.


Since: 1.26.
Constructor Summary
new sap.m.UploadCollectionItem(sId?, mSettings?)Constructor for a new UploadCollectionItem

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.

Method Summary
sap.m.UploadCollectionItem.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.UploadCollectionItem with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.UploadCollectionItem.getMetadata()Returns a metadata object for class sap.m.UploadCollectionItem.
addAttribute(oAttribute)Adds some attribute to the aggregation attributes.
addStatus(oStatus)Adds some status to the aggregation statuses.
bindAttributes(oBindingInfo)Binds aggregation attributes to model data.
bindStatuses(oBindingInfo)Binds aggregation statuses to model data.
destroyAttributes()Destroys all the attributes in the aggregation attributes.
destroyStatuses()Destroys all the statuses in the aggregation statuses.
download(askForLocation)Downloads the item.
getAriaLabelForPicture()Gets current value of property ariaLabelForPicture.
getAttributes()Gets content of aggregation attributes.
getDocumentId()Gets current value of property documentId.
getEnableDelete()Gets current value of property enableDelete.
getEnableEdit()Gets current value of property enableEdit.
getFileName()Gets current value of property fileName.
getFileUploader()ID of the element which is the current target of the association fileUploader, or null.
getMimeType()Gets current value of property mimeType.
getSelected()Gets current value of property selected.
getStatuses()Gets content of aggregation statuses.
getThumbnailUrl()Gets current value of property thumbnailUrl.
getUrl()Gets current value of property url.
getVisibleDelete()Gets current value of property visibleDelete.
getVisibleEdit()Gets current value of property visibleEdit.
indexOfAttribute(oAttribute)Checks for the provided sap.m.ObjectAttribute in the aggregation attributes.
indexOfStatus(oStatus)Checks for the provided sap.m.ObjectStatus in the aggregation statuses.
insertAttribute(oAttribute, iIndex)Inserts a attribute into the aggregation attributes.
insertStatus(oStatus, iIndex)Inserts a status into the aggregation statuses.
removeAllAttributes()Removes all the controls from the aggregation attributes.
removeAllStatuses()Removes all the controls from the aggregation statuses.
removeAttribute(vAttribute)Removes a attribute from the aggregation attributes.
removeStatus(vStatus)Removes a status from the aggregation statuses.
setAriaLabelForPicture(sAriaLabelForPicture)Sets a new value for property ariaLabelForPicture.
setDocumentId(sDocumentId)Sets a new value for property documentId.
setEnableDelete(bEnableDelete)Sets a new value for property enableDelete.
setEnableEdit(bEnableEdit)Sets a new value for property enableEdit.
setFileName(sFileName)Sets a new value for property fileName.
setFileUploader(oFileUploader)Sets the associated fileUploader.
setMimeType(sMimeType)Sets a new value for property mimeType.
setSelected(selected)Setter of the selected property.
setThumbnailUrl(sThumbnailUrl)Sets a new value for property thumbnailUrl.
setUrl(sUrl)Sets a new value for property url.
setVisibleDelete(bVisibleDelete)Sets a new value for property visibleDelete.
setVisibleEdit(bVisibleEdit)Sets a new value for property visibleEdit.
unbindAttributes()Unbinds aggregation attributes from model data.
unbindStatuses()Unbinds aggregation statuses from model data.
getContributor()Gets current value of property contributor.
getFileSize()Gets current value of property fileSize.
getUploadedDate()Gets current value of property uploadedDate.
setContributor()Setter of the deprecated contributor property.
setFileSize()Setter of the deprecated fileSize property.
setUploadedDate()Setter of the deprecated uploadedDate property.
Constructor Detail
new sap.m.UploadCollectionItem(sId?, mSettings?)
Constructor for a new UploadCollectionItem

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, will be generated automatically if no ID is provided.
{object}mSettings? initial settings for the new control
Method Detail
sap.m.UploadCollectionItem.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.UploadCollectionItem 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.m.UploadCollectionItem.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.UploadCollectionItem.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAttribute(oAttribute): sap.m.UploadCollectionItem
Adds some attribute to the aggregation attributes.
Parameters:
{sap.m.ObjectAttribute}oAttribute the attribute to add; if empty, nothing is inserted
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
addStatus(oStatus): sap.m.UploadCollectionItem
Adds some status to the aggregation statuses.
Parameters:
{sap.m.ObjectStatus}oStatus the status to add; if empty, nothing is inserted
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
bindAttributes(oBindingInfo): sap.m.UploadCollectionItem
Binds aggregation attributes to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
bindStatuses(oBindingInfo): sap.m.UploadCollectionItem
Binds aggregation statuses to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
destroyAttributes(): sap.m.UploadCollectionItem
Destroys all the attributes in the aggregation attributes.
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
destroyStatuses(): sap.m.UploadCollectionItem
Destroys all the statuses in the aggregation statuses.
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
download(askForLocation)
Downloads the item. The sap.ui.core.util.File method is used here. For further details on this method, see {sap.ui.core.util.File.save}.
Parameters:
{boolean}askForLocation Decides whether to ask for a location to download or not.
Since:
1.36.0
getAriaLabelForPicture(): string
Gets current value of property ariaLabelForPicture.

Aria label for the icon (or for the image).

Experimental API:since version 1.30. The behavior of the property might change in the next version.

Experimental:
since version 1.30. The behavior of the property might change in the next version.
Returns:
{string} Value of property ariaLabelForPicture
getAttributes(): sap.m.ObjectAttribute[]
Gets content of aggregation attributes.

Attributes of an uploaded item, for example, 'Uploaded By', 'Uploaded On', 'File Size' attributes are displayed after an item has been uploaded. Additionally, the Active property of sap.m.ObjectAttribute is supported.
Note that if one of the deprecated properties contributor, fileSize or UploadedDate is filled in addition to this attribute, two attributes with the same title are displayed as these properties get displayed as an attribute. Example: An application passes the property ‘contributor’ with the value ‘A’ and the aggregation attributes ‘contributor’: ‘B’. As a result, the attributes ‘contributor’:’A’ and ‘contributor’:’B’ are displayed. To make sure the title does not appear twice, check if one of the properties is filled.

Since:
1.30
Returns:
{sap.m.ObjectAttribute[]}
getDocumentId(): string
Gets current value of property documentId.

Specifies a unique identifier of the file (created by the application).

Returns:
{string} Value of property documentId
getEnableDelete(): boolean
Gets current value of property enableDelete.

Enables/Disables the Delete button. If the value is true, the Delete button is enabled and the delete function can be used. If the value is false, the delete function is not available.

Default value is true.

Returns:
{boolean} Value of property enableDelete
getEnableEdit(): boolean
Gets current value of property enableEdit.

Enables/Disables the Edit button. If the value is true, the Edit button is enabled and the edit function can be used. If the value is false, the edit function is not available.

Default value is true.

Returns:
{boolean} Value of property enableEdit
getFileName(): string
Gets current value of property fileName.

Specifies the name of the uploaded file.

Returns:
{string} Value of property fileName
getFileUploader(): sap.ui.unified.FileUploader
ID of the element which is the current target of the association fileUploader, or null.
Returns:
{sap.ui.unified.FileUploader}
getMimeType(): string
Gets current value of property mimeType.

Specifies the MIME type of the file.

Returns:
{string} Value of property mimeType
getSelected(): boolean
Gets current value of property selected.

Defines the selected state of the UploadCollectionItem.

Default value is false.

Since:
1.34
Returns:
{boolean} Value of property selected
getStatuses(): sap.m.ObjectStatus[]
Gets content of aggregation statuses.

Statuses of an uploaded item Statuses will be displayed after an item has been uploaded

Since:
1.30
Returns:
{sap.m.ObjectStatus[]}
getThumbnailUrl(): string
Gets current value of property thumbnailUrl.

Specifies the URL where the thumbnail of the file is located.

Returns:
{string} Value of property thumbnailUrl
getUrl(): string
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 of the UploadCollectionItem are not clickable.

Returns:
{string} Value of property url
getVisibleDelete(): boolean
Gets current value of property visibleDelete.

Show/Hide the Delete button. If the value is true, the Delete button is visible. If the value is false, the Delete button is not visible.

Default value is true.

Returns:
{boolean} Value of property visibleDelete
getVisibleEdit(): boolean
Gets current value of property visibleEdit.

Show/Hide the Edit button. If the value is true, the Edit button is visible. If the value is false, the Edit button is not visible.

Default value is true.

Returns:
{boolean} Value of property visibleEdit
indexOfAttribute(oAttribute): int
Checks for the provided sap.m.ObjectAttribute in the aggregation attributes. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.ObjectAttribute}oAttribute The attribute whose index is looked for
Since:
1.30
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfStatus(oStatus): int
Checks for the provided sap.m.ObjectStatus in the aggregation statuses. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.ObjectStatus}oStatus The status whose index is looked for
Since:
1.30
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertAttribute(oAttribute, iIndex): sap.m.UploadCollectionItem
Inserts a attribute into the aggregation attributes.
Parameters:
{sap.m.ObjectAttribute}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
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
insertStatus(oStatus, iIndex): sap.m.UploadCollectionItem
Inserts a status into the aggregation statuses.
Parameters:
{sap.m.ObjectStatus}oStatus the status to insert; if empty, nothing is inserted
{int}iIndex 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
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
removeAllAttributes(): sap.m.ObjectAttribute[]
Removes all the controls from the aggregation attributes.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.30
Returns:
{sap.m.ObjectAttribute[]} An array of the removed elements (might be empty)
removeAllStatuses(): sap.m.ObjectStatus[]
Removes all the controls from the aggregation statuses.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.30
Returns:
{sap.m.ObjectStatus[]} An array of the removed elements (might be empty)
removeAttribute(vAttribute): sap.m.ObjectAttribute
Removes a attribute from the aggregation attributes.
Parameters:
{int|string|sap.m.ObjectAttribute}vAttribute The attributeto remove or its index or id
Since:
1.30
Returns:
{sap.m.ObjectAttribute} The removed attribute or null
removeStatus(vStatus): sap.m.ObjectStatus
Removes a status from the aggregation statuses.
Parameters:
{int|string|sap.m.ObjectStatus}vStatus The statusto remove or its index or id
Since:
1.30
Returns:
{sap.m.ObjectStatus} The removed status or null
setAriaLabelForPicture(sAriaLabelForPicture): sap.m.UploadCollectionItem
Sets a new value for property ariaLabelForPicture.

Aria label for the icon (or for the image).

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

Experimental API:since version 1.30. The behavior of the property might change in the next version.

Parameters:
{string}sAriaLabelForPicture New value for property ariaLabelForPicture
Experimental:
since version 1.30. The behavior of the property might change in the next version.
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setDocumentId(sDocumentId): sap.m.UploadCollectionItem
Sets a new value for property documentId.

Specifies a unique identifier of the file (created by the application).

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

Parameters:
{string}sDocumentId New value for property documentId
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setEnableDelete(bEnableDelete): sap.m.UploadCollectionItem
Sets a new value for property enableDelete.

Enables/Disables the Delete button. If the value is true, the Delete button is enabled and the delete function can be used. If the value is false, the delete function is not available.

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

Default value is true.

Parameters:
{boolean}bEnableDelete New value for property enableDelete
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setEnableEdit(bEnableEdit): sap.m.UploadCollectionItem
Sets a new value for property enableEdit.

Enables/Disables the Edit button. If the value is true, the Edit button is enabled and the edit function can be used. If the value is false, the edit function is not available.

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

Default value is true.

Parameters:
{boolean}bEnableEdit New value for property enableEdit
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setFileName(sFileName): sap.m.UploadCollectionItem
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.

Parameters:
{string}sFileName New value for property fileName
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setFileUploader(oFileUploader): sap.m.UploadCollectionItem
Sets the associated fileUploader.
Parameters:
{sap.ui.unified.FileUploader}oFileUploader Id of an element which becomes the new target of this fileUploader association; alternatively, an element instance may be given
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setMimeType(sMimeType): sap.m.UploadCollectionItem
Sets a new value for property mimeType.

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.

Parameters:
{string}sMimeType New value for property mimeType
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setSelected(selected): sap.m.UploadCollectionItem
Setter of the selected property.
Parameters:
{boolean}selected value to set on Selected property
Since:
1.34
Returns:
{sap.m.UploadCollectionItem} The current UploadCollectionItem
setThumbnailUrl(sThumbnailUrl): sap.m.UploadCollectionItem
Sets a new value for property thumbnailUrl.

Specifies the URL where the thumbnail of the file is located.

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

Parameters:
{string}sThumbnailUrl New value for property thumbnailUrl
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
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 of the UploadCollectionItem are not clickable.

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

Parameters:
{string}sUrl New value for property url
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setVisibleDelete(bVisibleDelete): sap.m.UploadCollectionItem
Sets a new value for property visibleDelete.

Show/Hide the Delete button. If the value is true, the Delete button is visible. If the value is false, the Delete button is not visible.

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

Default value is true.

Parameters:
{boolean}bVisibleDelete New value for property visibleDelete
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
setVisibleEdit(bVisibleEdit): sap.m.UploadCollectionItem
Sets a new value for property visibleEdit.

Show/Hide the Edit button. If the value is true, the Edit button is visible. If the value is false, the Edit button is not visible.

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

Default value is true.

Parameters:
{boolean}bVisibleEdit New value for property visibleEdit
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
unbindAttributes(): sap.m.UploadCollectionItem
Unbinds aggregation attributes from model data.
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
unbindStatuses(): sap.m.UploadCollectionItem
Unbinds aggregation statuses from model data.
Since:
1.30
Returns:
{sap.m.UploadCollectionItem} Reference to this in order to allow method chaining
getContributor(): string
Gets current value of property contributor.

Specifies the name of the user who uploaded the file.

Deprecated:
since version 1.30. This property is deprecated; use the aggregation attributes instead. However, if the property is filled, it is displayed as an attribute. To make sure the title does not appear twice, do not use the property.
Returns:
{string} Value of property contributor
getFileSize(): float
Gets current value of property fileSize.

Specifies the size of the uploaded file (in megabytes).

Deprecated:
since version 1.30. This property is deprecated; use the aggregation attributes instead.
Returns:
{float} Value of property fileSize
getUploadedDate(): string
Gets current value of property uploadedDate.

Specifies the date on which the file was uploaded. The application has to define the date format.

Deprecated:
since version 1.30. This property is deprecated; use the aggregation attributes instead.
Returns:
{string} Value of property uploadedDate
setContributor()
Setter of the deprecated contributor property. The property is mapped to the aggregation attributes.
Deprecated:
since version 1.30
setFileSize()
Setter of the deprecated fileSize property. The property is mapped to the aggregation attributes.
Deprecated:
since version 1.30
setUploadedDate()
Setter of the deprecated uploadedDate property. The property is mapped to the aggregation attributes.
Deprecated:
since version 1.30