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 |
Returns a metadata object for class sap.m.UploadCollectionItem.
Returns:
Adds some attribute to the aggregation attributes
.
Parameters:
- Since:
- 1.30
Returns:
Adds some status to the aggregation statuses
.
Parameters:
- Since:
- 1.30
Returns:
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:
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:
Destroys all the attributes in the aggregation attributes
.
- Since:
- 1.30
Returns:
Destroys all the statuses in the aggregation statuses
.
- Since:
- 1.30
Returns:
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 |
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:
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 |
ID of the element which is the current target of the association fileUploader
, or null
.
Returns:
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 |
Gets content of aggregation
statuses
.
Statuses of an uploaded item Statuses will be displayed after an item has been uploaded
- Since:
- 1.30
Returns:
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:
- 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:
- Since:
- 1.30
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
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:
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:
Removes all the controls from the aggregation
attributes
.
Additionally, it unregisters them from the hosting UIArea.
- Since:
- 1.30
Returns:
Removes all the controls from the aggregation
statuses
.
Additionally, it unregisters them from the hosting UIArea.
- Since:
- 1.30
Returns:
Removes a attribute from the aggregation attributes
.
Parameters:
- Since:
- 1.30
Returns:
Removes a status from the aggregation statuses
.
Parameters:
- Since:
- 1.30
Returns:
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:
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:
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:
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:
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:
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:
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:
Setter of the selected property.
Parameters:
{boolean} | selected | value to set on Selected property |
- Since:
- 1.34
Returns:
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:
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:
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:
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:
Unbinds aggregation attributes
from model data.
- Since:
- 1.30
Returns:
Unbinds aggregation statuses
from model data.
- Since:
- 1.30
Returns:
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