sap.m.UploadCollection.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.UploadCollection 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.Control.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.UploadCollection.
Returns:
Adds some headerParameter to the aggregation headerParameters
.
Parameters:
Returns:
Adds some item to the aggregation items
.
Parameters:
Returns:
Adds some parameter to the aggregation parameters
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
beforeUploadStarts
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered before the actual upload starts. An event is fired per file. All the necessary header parameters should be set here.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Attaches event handler
fnFunction
to the
change
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered when files are selected in the FileUploader dialog. Applications can set parameters and headerParameters which will be dispatched to the embedded FileUploader control. Limitation: parameters and headerParameters are not supported by Internet Explorer 9.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Attaches event handler
fnFunction
to the
fileDeleted
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered when an uploaded attachment is selected and the Delete button is pressed.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Attaches event handler
fnFunction
to the
filenameLengthExceed
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered when the name of a chosen file is longer than the value specified with the maximumFilenameLength property (only if provided by the application).
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Attaches event handler
fnFunction
to the
fileRenamed
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered when the file name is changed.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Attaches event handler
fnFunction
to the
fileSizeExceed
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered when the file size of an uploaded file is exceeded (only if the maxFileSize property was provided by the application). This event is not supported by Internet Explorer 9.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Attaches event handler
fnFunction
to the
selectionChange
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
Fires when selection is changed via user interaction inside the control.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
- Since:
- 1.36.0
Returns:
Attaches event handler
fnFunction
to the
typeMissmatch
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered when the file type or the MIME type don't match the permitted types (only if the fileType property or the mimeType property are provided by the application).
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Attaches event handler
fnFunction
to the
uploadComplete
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered as soon as the upload request is completed.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Attaches event handler
fnFunction
to the
uploadTerminated
event of this
sap.m.UploadCollection
.
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.UploadCollection
itself.
The event is triggered as soon as the upload request was terminated by the user.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself |
Returns:
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
Destroys all the headerParameters in the aggregation headerParameters
.
Returns:
Destroys all the items in the aggregation items
.
Returns:
Destroys all the parameters in the aggregation parameters
.
Returns:
Destroys the toolbar in the aggregation toolbar
.
- Since:
- 1.34
Returns:
Detaches event handler
fnFunction
from the
beforeUploadStarts
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
change
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
fileDeleted
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
filenameLengthExceed
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
fileRenamed
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
fileSizeExceed
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
selectionChange
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.36.0
Returns:
Detaches event handler
fnFunction
from the
typeMissmatch
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
uploadComplete
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
uploadTerminated
event of this
sap.m.UploadCollection
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
downloadItem(uploadCollectionItem, askForLocation): boolean
Downloads the given item. This function delegates to {sap.m.UploadCollectionItem.download}.
Parameters:
{sap.m.UploadCollectionItem} | uploadCollectionItem | The item to download. This parameter is mandatory. |
{boolean} | askForLocation | Decides whether to ask for a location to download or not. |
- Since:
- 1.36.0
Returns:
{boolean} | True if the download has started successfully. False if the download couldn't be started. |
Fires event
beforeUploadStarts
to attached listeners.
Expects the following event parameters:
fileName
of type string
Specifies the name of the file to be uploaded.addHeaderParameter
of type function
Adds a header parameter to the file that will be uploaded.getHeaderParameter
of type function
Returns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
change
to attached listeners.
Expects the following event parameters:
documentId
of type string
An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.files
of type object[]
A FileList of individually selected files from the underlying system. See www.w3.org for the FileList Interface definition. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
fileDeleted
to attached listeners.
Expects the following event parameters:
documentId
of type string
An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.item
of type sap.m.UploadCollectionItem
An item to be deleted from the collection. Since version 1.28.0.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
filenameLengthExceed
to attached listeners.
Expects the following event parameters:
documentId
of type string
An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.files
of type object[]
A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
fileRenamed
to attached listeners.
Expects the following event parameters:
documentId
of type string
An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.fileName
of type string
The new file name. This parameter is deprecated since version 1.28.0, use parameter item instead.item
of type sap.m.UploadCollectionItem
The renamed UI element as a UploadCollectionItem. Since version 1.28.0.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
fileSizeExceed
to attached listeners.
Expects the following event parameters:
documentId
of type string
An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.fileSize
of type string
The size in MB of a file to be uploaded. This parameter is deprecated since version 1.28.0, use parameter files instead.files
of type object[]
A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
selectionChange
to attached listeners.
Expects the following event parameters:
selectedItem
of type sap.m.UploadCollectionItem
The item whose selection has changed. In MultiSelect
mode, only the selected item upmost is returned. This parameter can be used for single-selection modes.selectedItems
of type sap.m.UploadCollectionItem[]
Array of items whose selection has changed. This parameter can be used for MultiSelect
mode.selected
of type boolean
Indicates whether the listItem
parameter is selected or not.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.36.0
Returns:
Fires event
typeMissmatch
to attached listeners.
Expects the following event parameters:
documentId
of type string
An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.fileType
of type string
File type. This parameter is deprecated since version 1.28.0, use parameter files instead.mimeType
of type string
MIME type. This parameter is deprecated since version 1.28.0, use parameter files instead.files
of type object[]
A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file. Since version 1.28.0.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
uploadComplete
to attached listeners.
Expects the following event parameters:
readyStateXHR
of type string
Ready state XHR. This parameter is deprecated since version 1.28.0., use parameter files instead.response
of type string
Response of the completed upload request. This parameter is deprecated since version 1.28.0., use parameter files instead.status
of type string
Status Code of the completed upload event. This parameter is deprecated since version 1.28.0., use parameter files instead.files
of type object[]
A list of uploaded files. Each entry contains the following members. fileName : The name of a file to be uploaded. response : Response message which comes from the server. On the server side, this response has to be put within the 'body' tags of the response document of the iFrame. It can consist of a return code and an optional message. This does not work in cross-domain scenarios. responseRaw : HTTP-Response which comes from the server. This property is not supported by Internet Explorer Versions lower than 9. status : Status of the XHR request. This property is not supported by Internet Explorer 9 and lower. headers : HTTP-Response-Headers which come from the server. Provided as a JSON-map, i.e. each header-field is reflected by a property in the header-object, with the property value reflecting the header-field's content. This property is not supported by Internet Explorer 9 and lower. Since version 1.28.0.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
uploadTerminated
to attached listeners.
Expects the following event parameters:
fileName
of type string
Specifies the name of the file of which the upload is to be terminated.getHeaderParameter
of type function
This callback function returns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getFileType(): string[]
Gets current value of property
fileType
.
Defines the allowed file types for the upload. The chosen files will be checked against an array of file types. If at least one file does not fit the file type requirements, the upload is prevented. Example: ["jpg", "png", "bmp"].
Returns:
{string[]} | Value of property fileType |
Gets content of aggregation
headerParameters
.
Specifies the header parameters for the FileUploader that are submitted only with XHR requests. Header parameters are not supported by Internet Explorer 8 and 9.
Returns:
getInstantUpload(): boolean
Gets current value of property
instantUpload
.
If false, no upload is triggered when a file is selected. In addition, if a file was selected, a new FileUploader instance is created to ensure that multiple files from multiple folders can be chosen.
Default value is true
.
- Since:
- 1.30
Returns:
{boolean} | Value of property instantUpload |
Gets content of aggregation
items
.
Uploaded items.
Returns:
getMaximumFilenameLength(): int
Gets current value of property
maximumFilenameLength
.
Specifies the maximum length of a file name. If the maximum file name length is exceeded, the corresponding event 'filenameLengthExceed' is triggered.
Returns:
{int} | Value of property maximumFilenameLength |
getMaximumFileSize(): float
Gets current value of property
maximumFileSize
.
Specifies a file size limit in megabytes that prevents the upload if at least one file exceeds the limit. This property is not supported by Internet Explorer 8 and 9.
Returns:
{float} | Value of property maximumFileSize |
getMimeType(): string[]
Gets current value of property
mimeType
.
Defines the allowed MIME types of files to be uploaded. The chosen files will be checked against an array of MIME types. If at least one file does not fit the MIME type requirements, the upload is prevented. This property is not supported by Internet Explorer 8 and 9. Example: mimeType ["image/png", "image/jpeg"].
Returns:
{string[]} | Value of property mimeType |
Gets current value of property
mode
.
Defines the selection mode of the control (e.g. None, SingleSelect, MultiSelect, SingleSelectLeft, SingleSelectMaster). Since the UploadCollection reacts like a list for attachments, the API is close to the ListBase Interface. sap.m.ListMode.Delete mode is not supported and will be automatically set to sap.m.ListMode.None. In addition, if instant upload is set to false the mode sap.m.ListMode.MultiSelect is not supported and will be automatically set to sap.m.ListMode.None.
Default value is None
.
- Since:
- 1.34
Returns:
getMultiple(): boolean
Gets current value of property
multiple
.
Lets the user select multiple files from the same folder and then upload them. Internet Explorer 8 and 9 do not support this property. Please note that the various operating systems for mobile devices can react differently to the property so that fewer upload functions may be available in some cases.
Default value is false
.
Returns:
{boolean} | Value of property multiple |
getNoDataText(): string
Gets current value of property
noDataText
.
Allows you to set your own text for the 'No data' text label.
Returns:
{string} | Value of property noDataText |
getNumberOfAttachmentsText(): string
Gets current value of property
numberOfAttachmentsText
.
Sets the title text in the toolbar of the list of attachments. To show as well the number of attachments in brackets like the default text does. The number of attachments could be retrieved via "getItems().length". If a new title is set, the default is deactivated. The default value is set to language-dependent "Attachments (n)".
- Since:
- 1.30
Returns:
{string} | Value of property numberOfAttachmentsText |
Gets content of aggregation
parameters
.
Specifies the parameters for the FileUploader that are rendered as a hidden input field.
Returns:
getSameFilenameAllowed(): boolean
Gets current value of property
sameFilenameAllowed
.
Allows the user to use the same name for a file when editing the file name. 'Same name' refers to an already existing file name in the list.
Default value is false
.
Returns:
{boolean} | Value of property sameFilenameAllowed |
Returns selected UploadCollectionItem.
- Since:
- 1.34
Returns:
Returns an array containing the selected UploadCollectionItems.
- Since:
- 1.34
Returns:
Gets current value of property
showSeparators
.
Defines whether separators are shown between list items.
Default value is All
.
Returns:
Gets content of aggregation
toolbar
.
Specifies the toolbar.
- Since:
- 1.34
Returns:
getUploadEnabled(): boolean
Gets current value of property
uploadEnabled
.
Enables the upload of a file.
Default value is true
.
Returns:
{boolean} | Value of property uploadEnabled |
getUploadUrl(): string
Gets current value of property
uploadUrl
.
Specifies the URL where the uploaded files have to be stored.
Default value is ../../../upload
.
Returns:
{string} | Value of property uploadUrl |
indexOfHeaderParameter(oHeaderParameter): int
Checks for the provided sap.m.UploadCollectionParameter
in the aggregation headerParameters
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfItem(oItem): int
Checks for the provided sap.m.UploadCollectionItem
in the aggregation items
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfParameter(oParameter): int
Checks for the provided sap.m.UploadCollectionParameter
in the aggregation parameters
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a headerParameter into the aggregation headerParameters
.
Parameters:
{sap.m.UploadCollectionParameter} | oHeaderParameter | the headerParameter to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the headerParameter should be inserted at; for a negative value of iIndex , the headerParameter is inserted at position 0; for a value greater than the current size of the aggregation, the headerParameter is inserted at the last position |
Returns:
Inserts a item into the aggregation items
.
Parameters:
{sap.m.UploadCollectionItem} | oItem | the item to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the item should be inserted at; for a negative value of iIndex , the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position |
Returns:
Inserts a parameter into the aggregation parameters
.
Parameters:
{sap.m.UploadCollectionParameter} | oParameter | the parameter to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the parameter should be inserted at; for a negative value of iIndex , the parameter is inserted at position 0; for a value greater than the current size of the aggregation, the parameter is inserted at the last position |
Returns:
Opens the FileUploader dialog. When an UploadCollectionItem is provided, this method can be used to update a file with a new version. In this case, the upload progress can be sequenced using the events: beforeUploadStarts, uploadComplete and uploadTerminated. For this use, multiple properties from the UploadCollection have to be set to false. If no UploadCollectionItem is provided, only the dialog opens and no further configuration of the UploadCollection is needed.
Parameters:
- Since:
- 1.38.0
Returns:
Removes all the controls from the aggregation
headerParameters
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
items
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
parameters
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a headerParameter from the aggregation headerParameters
.
Parameters:
Returns:
Removes a item from the aggregation items
.
Parameters:
Returns:
Removes a parameter from the aggregation parameters
.
Parameters:
Returns:
Select all items in "MultiSelection" mode.
- Since:
- 1.34
Returns:
Sets a new value for property
fileType
.
Defines the allowed file types for the upload. The chosen files will be checked against an array of file types. If at least one file does not fit the file type requirements, the upload is prevented. Example: ["jpg", "png", "bmp"].
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string[]} | sFileType | New value for property fileType |
Returns:
Sets a new value for property
instantUpload
.
If false, no upload is triggered when a file is selected. In addition, if a file was selected, a new FileUploader instance is created to ensure that multiple files from multiple folders can be chosen.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bInstantUpload | New value for property instantUpload |
- Since:
- 1.30
Returns:
Sets a new value for property
maximumFilenameLength
.
Specifies the maximum length of a file name. If the maximum file name length is exceeded, the corresponding event 'filenameLengthExceed' is triggered.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{int} | iMaximumFilenameLength | New value for property maximumFilenameLength |
Returns:
Sets a new value for property
maximumFileSize
.
Specifies a file size limit in megabytes that prevents the upload if at least one file exceeds the limit. This property is not supported by Internet Explorer 8 and 9.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{float} | fMaximumFileSize | New value for property maximumFileSize |
Returns:
Sets a new value for property
mimeType
.
Defines the allowed MIME types of files to be uploaded. The chosen files will be checked against an array of MIME types. If at least one file does not fit the MIME type requirements, the upload is prevented. This property is not supported by Internet Explorer 8 and 9. Example: mimeType ["image/png", "image/jpeg"].
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:
Sets a new value for property
mode
.
Defines the selection mode of the control (e.g. None, SingleSelect, MultiSelect, SingleSelectLeft, SingleSelectMaster). Since the UploadCollection reacts like a list for attachments, the API is close to the ListBase Interface. sap.m.ListMode.Delete mode is not supported and will be automatically set to sap.m.ListMode.None. In addition, if instant upload is set to false the mode sap.m.ListMode.MultiSelect is not supported and will be automatically set to sap.m.ListMode.None.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
Parameters:
- Since:
- 1.34
Returns:
Sets a new value for property
multiple
.
Lets the user select multiple files from the same folder and then upload them. Internet Explorer 8 and 9 do not support this property. Please note that the various operating systems for mobile devices can react differently to the property so that fewer upload functions may be available in some cases.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bMultiple | New value for property multiple |
Returns:
Sets a new value for property
noDataText
.
Allows you to set your own text for the 'No data' text label.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sNoDataText | New value for property noDataText |
Returns:
Sets a new value for property
numberOfAttachmentsText
.
Sets the title text in the toolbar of the list of attachments. To show as well the number of attachments in brackets like the default text does. The number of attachments could be retrieved via "getItems().length". If a new title is set, the default is deactivated. The default value is set to language-dependent "Attachments (n)".
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sNumberOfAttachmentsText | New value for property numberOfAttachmentsText |
- Since:
- 1.30
Returns:
Sets a new value for property
sameFilenameAllowed
.
Allows the user to use the same name for a file when editing the file name. 'Same name' refers to an already existing file name in the list.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bSameFilenameAllowed | New value for property sameFilenameAllowed |
Returns:
Selects or deselects the given list item.
Parameters:
{sap.m.UploadCollectionItem} | uploadCollectionItem | The item whose selection to be changed. This parameter is mandatory. |
{boolean} | select | Sets selected status of the item. Default value is true. |
- Since:
- 1.34
Returns:
Sets a UploadCollectionItem to be selected by id. In single mode, the method removes the previous selection.
Parameters:
{string} | id | The id of the item whose selection to be changed. |
{boolean} | select | Sets selected status of the item. Default value is true. |
- Since:
- 1.34
Returns:
Sets a new value for property
showSeparators
.
Defines whether separators are shown between list items.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is All
.
Parameters:
Returns:
Sets the aggregated toolbar
.
Parameters:
- Since:
- 1.34
Returns:
Sets a new value for property
uploadEnabled
.
Enables the upload of a file.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bUploadEnabled | New value for property uploadEnabled |
Returns:
Sets a new value for property
uploadUrl
.
Specifies the URL where the uploaded files have to be stored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is ../../../upload
.
Parameters:
{string} | sUploadUrl | New value for property uploadUrl |
Returns:
Unbinds aggregation items
from model data.
Returns:
upload(): void
Starts the upload for all selected files.
- Since:
- 1.30