Class sap.m.UploadCollectionModule: sap/m/UploadCollection

extends Control

This control allows you to upload single or multiple files from your devices (desktop, tablet or phone) and attach them to the application.

The consuming application needs to take into account that the consistency checks of the model during the upload of the file need to be performed, for example, if the user is editing or deleting a file.


Since: 1.26.
Constructor Summary
new sap.m.UploadCollection(sId?, mSettings?)Constructor for a new UploadCollection.
Event Summary
beforeUploadStarts(oControlEvent)The event is triggered before the actual upload starts.
change(oControlEvent)The event is triggered when files are selected in the FileUploader dialog.
fileDeleted(oControlEvent)The event is triggered when an uploaded attachment is selected and the Delete button is pressed.
filenameLengthExceed(oControlEvent)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).
fileRenamed(oControlEvent)The event is triggered when the file name is changed.
fileSizeExceed(oControlEvent)The event is triggered when the file size of an uploaded file is exceeded (only if the maxFileSize property was provided by the application).
selectionChange(oControlEvent)Fires when selection is changed via user interaction inside the control.
typeMissmatch(oControlEvent)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).
uploadComplete(oControlEvent)The event is triggered as soon as the upload request is completed.
uploadTerminated(oControlEvent)The event is triggered as soon as the upload request was terminated by the user.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.UploadCollection.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.UploadCollection with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.UploadCollection.getMetadata()Returns a metadata object for class sap.m.UploadCollection.
addHeaderParameter(oHeaderParameter)Adds some headerParameter to the aggregation headerParameters.
addItem(oItem)Adds some item to the aggregation items.
addParameter(oParameter)Adds some parameter to the aggregation parameters.
attachBeforeUploadStarts(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeUploadStarts event of this sap.m.UploadCollection.
attachChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the change event of this sap.m.UploadCollection.
attachFileDeleted(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fileDeleted event of this sap.m.UploadCollection.
attachFilenameLengthExceed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the filenameLengthExceed event of this sap.m.UploadCollection.
attachFileRenamed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fileRenamed event of this sap.m.UploadCollection.
attachFileSizeExceed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fileSizeExceed event of this sap.m.UploadCollection.
attachSelectionChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the selectionChange event of this sap.m.UploadCollection.
attachTypeMissmatch(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the typeMissmatch event of this sap.m.UploadCollection.
attachUploadComplete(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the uploadComplete event of this sap.m.UploadCollection.
attachUploadTerminated(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the uploadTerminated event of this sap.m.UploadCollection.
bindItems(oBindingInfo)Binds aggregation items to model data.
destroyHeaderParameters()Destroys all the headerParameters in the aggregation headerParameters.
destroyInfoToolbar()Destroys the infoToolbar in the aggregation infoToolbar.
destroyItems()Destroys all the items in the aggregation items.
destroyParameters()Destroys all the parameters in the aggregation parameters.
destroyToolbar()Destroys the toolbar in the aggregation toolbar.
detachBeforeUploadStarts(fnFunction, oListener)Detaches event handler fnFunction from the beforeUploadStarts event of this sap.m.UploadCollection.
detachChange(fnFunction, oListener)Detaches event handler fnFunction from the change event of this sap.m.UploadCollection.
detachFileDeleted(fnFunction, oListener)Detaches event handler fnFunction from the fileDeleted event of this sap.m.UploadCollection.
detachFilenameLengthExceed(fnFunction, oListener)Detaches event handler fnFunction from the filenameLengthExceed event of this sap.m.UploadCollection.
detachFileRenamed(fnFunction, oListener)Detaches event handler fnFunction from the fileRenamed event of this sap.m.UploadCollection.
detachFileSizeExceed(fnFunction, oListener)Detaches event handler fnFunction from the fileSizeExceed event of this sap.m.UploadCollection.
detachSelectionChange(fnFunction, oListener)Detaches event handler fnFunction from the selectionChange event of this sap.m.UploadCollection.
detachTypeMissmatch(fnFunction, oListener)Detaches event handler fnFunction from the typeMissmatch event of this sap.m.UploadCollection.
detachUploadComplete(fnFunction, oListener)Detaches event handler fnFunction from the uploadComplete event of this sap.m.UploadCollection.
detachUploadTerminated(fnFunction, oListener)Detaches event handler fnFunction from the uploadTerminated event of this sap.m.UploadCollection.
downloadItem(uploadCollectionItem, askForLocation)Downloads the given item.
fireBeforeUploadStarts(mParameters?)Fires event beforeUploadStarts to attached listeners.
fireChange(mParameters?)Fires event change to attached listeners.
fireFileDeleted(mParameters?)Fires event fileDeleted to attached listeners.
fireFilenameLengthExceed(mParameters?)Fires event filenameLengthExceed to attached listeners.
fireFileRenamed(mParameters?)Fires event fileRenamed to attached listeners.
fireFileSizeExceed(mParameters?)Fires event fileSizeExceed to attached listeners.
fireSelectionChange(mParameters?)Fires event selectionChange to attached listeners.
fireTypeMissmatch(mParameters?)Fires event typeMissmatch to attached listeners.
fireUploadComplete(mParameters?)Fires event uploadComplete to attached listeners.
fireUploadTerminated(mParameters?)Fires event uploadTerminated to attached listeners.
getFileType()Gets current value of property fileType.
getHeaderParameters()Gets content of aggregation headerParameters.
getInfoToolbar()Gets content of aggregation infoToolbar.
getInstantUpload()Gets current value of property instantUpload.
getItems()Gets content of aggregation items.
getMaximumFilenameLength()Gets current value of property maximumFilenameLength.
getMaximumFileSize()Gets current value of property maximumFileSize.
getMimeType()Gets current value of property mimeType.
getMode()Gets current value of property mode.
getMultiple()Gets current value of property multiple.
getNoDataDescription()Gets current value of property noDataDescription.
getNoDataText()Gets current value of property noDataText.
getNumberOfAttachmentsText()Gets current value of property numberOfAttachmentsText.
getParameters()Gets content of aggregation parameters.
getSameFilenameAllowed()Gets current value of property sameFilenameAllowed.
getSelectedItem()Returns selected UploadCollectionItem.
getSelectedItems()Returns an array containing the selected UploadCollectionItems.
getShowSeparators()Gets current value of property showSeparators.
getTerminationEnabled()Gets current value of property terminationEnabled.
getToolbar()Gets content of aggregation toolbar.
getUploadButtonInvisible()Gets current value of property uploadButtonInvisible.
getUploadEnabled()Gets current value of property uploadEnabled.
getUploadUrl()Gets current value of property uploadUrl.
indexOfHeaderParameter(oHeaderParameter)Checks for the provided sap.m.UploadCollectionParameter in the aggregation headerParameters.
indexOfItem(oItem)Checks for the provided sap.m.UploadCollectionItem in the aggregation items.
indexOfParameter(oParameter)Checks for the provided sap.m.UploadCollectionParameter in the aggregation parameters.
insertHeaderParameter(oHeaderParameter, iIndex)Inserts a headerParameter into the aggregation headerParameters.
insertItem(oItem, iIndex)Inserts a item into the aggregation items.
insertParameter(oParameter, iIndex)Inserts a parameter into the aggregation parameters.
openFileDialog(item)Opens the FileUploader dialog.
removeAllHeaderParameters()Removes all the controls from the aggregation headerParameters.
removeAllItems()Removes all the controls from the aggregation items.
removeAllParameters()Removes all the controls from the aggregation parameters.
removeHeaderParameter(vHeaderParameter)Removes a headerParameter from the aggregation headerParameters.
removeItem(vItem)Removes a item from the aggregation items.
removeParameter(vParameter)Removes a parameter from the aggregation parameters.
selectAll()Select all items in "MultiSelection" mode.
setFileType(sFileType)Sets a new value for property fileType.
setInfoToolbar(oInfoToolbar)Sets the aggregated infoToolbar.
setInstantUpload(bInstantUpload)Sets a new value for property instantUpload.
setMaximumFilenameLength(iMaximumFilenameLength)Sets a new value for property maximumFilenameLength.
setMaximumFileSize(fMaximumFileSize)Sets a new value for property maximumFileSize.
setMimeType(sMimeType)Sets a new value for property mimeType.
setMode(sMode)Sets a new value for property mode.
setMultiple(bMultiple)Sets a new value for property multiple.
setNoDataDescription(sNoDataDescription)Sets a new value for property noDataDescription.
setNoDataText(sNoDataText)Sets a new value for property noDataText.
setNumberOfAttachmentsText(sNumberOfAttachmentsText)Sets a new value for property numberOfAttachmentsText.
setSameFilenameAllowed(bSameFilenameAllowed)Sets a new value for property sameFilenameAllowed.
setSelectedItem(uploadCollectionItem, select)Selects or deselects the given list item.
setSelectedItemById(id, select)Sets an UploadCollectionItem to be selected by id.
setShowSeparators(sShowSeparators)Sets a new value for property showSeparators.
setTerminationEnabled(bTerminationEnabled)Sets a new value for property terminationEnabled.
setToolbar(oToolbar)Sets the aggregated toolbar.
setUploadButtonInvisible(bUploadButtonInvisible)Sets a new value for property uploadButtonInvisible.
setUploadEnabled(bUploadEnabled)Sets a new value for property uploadEnabled.
setUploadUrl(sUploadUrl)Sets a new value for property uploadUrl.
unbindItems()Unbinds aggregation items from model data.
upload()Starts the upload for all selected files.
Constructor Detail
new sap.m.UploadCollection(sId?, mSettings?)

Constructor for a new UploadCollection.

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.Control can be used as well.

Parameters:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Event Detail
beforeUploadStarts(oControlEvent)
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:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.fileNameSpecifies the name of the file to be uploaded.
functionoControlEvent.getParameters.addHeaderParameterAdds a header parameter to the file that will be uploaded.
functionoControlEvent.getParameters.getHeaderParameterReturns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
change(oControlEvent)
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:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.documentIdA unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
object[]oControlEvent.getParameters.filesA 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.
fileDeleted(oControlEvent)
The event is triggered when an uploaded attachment is selected and the Delete button is pressed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.documentIdA unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.
sap.m.UploadCollectionItemoControlEvent.getParameters.itemAn item to be deleted from the collection. Since version 1.28.0.
filenameLengthExceed(oControlEvent)
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:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.documentIdA unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
object[]oControlEvent.getParameters.filesA 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.
fileRenamed(oControlEvent)
The event is triggered when the file name is changed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.documentIdA unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.
stringoControlEvent.getParameters.fileNameThe new file name. This parameter is deprecated since version 1.28.0, use parameter item instead.
sap.m.UploadCollectionItemoControlEvent.getParameters.itemThe renamed UI element as an UploadCollectionItem. Since version 1.28.0.
fileSizeExceed(oControlEvent)
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:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.documentIdA unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
stringoControlEvent.getParameters.fileSizeThe size in MB of a file to be uploaded. This parameter is deprecated since version 1.28.0, use parameter files instead.
object[]oControlEvent.getParameters.filesA 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.
selectionChange(oControlEvent)
Fires when selection is changed via user interaction inside the control.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.m.UploadCollectionItemoControlEvent.getParameters.selectedItemThe item whose selection has changed. In MultiSelect mode, only the selected item upmost is returned. This parameter can be used for single-selection modes.
sap.m.UploadCollectionItem[]oControlEvent.getParameters.selectedItemsArray of items whose selection has changed. This parameter can be used for MultiSelect mode.
booleanoControlEvent.getParameters.selectedIndicates whether the listItem parameter is selected or not.
Since:
1.36.0
typeMissmatch(oControlEvent)
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:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.documentIdA unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
stringoControlEvent.getParameters.fileTypeFile type. This parameter is deprecated since version 1.28.0, use parameter files instead.
stringoControlEvent.getParameters.mimeTypeMIME type. This parameter is deprecated since version 1.28.0, use parameter files instead.
object[]oControlEvent.getParameters.filesA FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file. Since version 1.28.0.
uploadComplete(oControlEvent)
The event is triggered as soon as the upload request is completed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.readyStateXHRReady state XHR. This parameter is deprecated since version 1.28.0., use parameter files instead.
stringoControlEvent.getParameters.responseResponse of the completed upload request. This parameter is deprecated since version 1.28.0., use parameter files instead.
stringoControlEvent.getParameters.statusStatus Code of the completed upload event. This parameter is deprecated since version 1.28.0., use parameter files instead.
object[]oControlEvent.getParameters.filesA 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. reponse : deprecated Since version 1.48.0. This parameter is deprecated, use parameter response instead. 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.
uploadTerminated(oControlEvent)
The event is triggered as soon as the upload request was terminated by the user.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.fileNameSpecifies the name of the file of which the upload is to be terminated.
functionoControlEvent.getParameters.getHeaderParameterThis callback function returns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
Method Detail
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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.UploadCollection.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.UploadCollection.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addHeaderParameter(oHeaderParameter): sap.m.UploadCollection
Adds some headerParameter to the aggregation headerParameters.
Parameters:
sap.m.UploadCollectionParameteroHeaderParameterthe headerParameter to add; if empty, nothing is inserted
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
addItem(oItem): sap.m.UploadCollection
Adds some item to the aggregation items.
Parameters:
sap.m.UploadCollectionItemoItemthe item to add; if empty, nothing is inserted
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
addParameter(oParameter): sap.m.UploadCollection
Adds some parameter to the aggregation parameters.
Parameters:
sap.m.UploadCollectionParameteroParameterthe parameter to add; if empty, nothing is inserted
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachBeforeUploadStarts(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachChange(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachFileDeleted(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachFilenameLengthExceed(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachFileRenamed(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachFileSizeExceed(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachSelectionChange(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.36.0
attachTypeMissmatch(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachUploadComplete(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
attachUploadTerminated(oData?, fnFunction, oListener?): sap.m.UploadCollection

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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
bindItems(oBindingInfo): sap.m.UploadCollection

Binds aggregation items to model data.

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

Parameters:
objectoBindingInfoThe binding information
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
destroyHeaderParameters(): sap.m.UploadCollection
Destroys all the headerParameters in the aggregation headerParameters.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
destroyInfoToolbar(): sap.m.UploadCollection
Destroys the infoToolbar in the aggregation infoToolbar.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.44
destroyItems(): sap.m.UploadCollection
Destroys all the items in the aggregation items.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
destroyParameters(): sap.m.UploadCollection
Destroys all the parameters in the aggregation parameters.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
destroyToolbar(): sap.m.UploadCollection
Destroys the toolbar in the aggregation toolbar.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.34
detachBeforeUploadStarts(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
detachChange(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
detachFileDeleted(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
detachFilenameLengthExceed(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
detachFileRenamed(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
detachFileSizeExceed(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
detachSelectionChange(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.36.0
detachTypeMissmatch(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
detachUploadComplete(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
detachUploadTerminated(fnFunction, oListener): sap.m.UploadCollection

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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
downloadItem(uploadCollectionItem, askForLocation): boolean
Downloads the given item. This function delegates to {sap.m.UploadCollectionItem.download}.
Parameters:
sap.m.UploadCollectionItemuploadCollectionItemThe item to download. This parameter is mandatory.
booleanaskForLocationDecides whether to ask for a location to download or not.
Returns:
booleanTrue if the download has started successfully. False if the download couldn't be started.
Since:
1.36.0
fireBeforeUploadStarts(mParameters?): sap.m.UploadCollection
Fires event beforeUploadStarts to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.fileName?Specifies the name of the file to be uploaded.
functionmParameters.addHeaderParameter?Adds a header parameter to the file that will be uploaded.
functionmParameters.getHeaderParameter?Returns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
fireChange(mParameters?): sap.m.UploadCollection
Fires event change to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.documentId?A unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
object[]mParameters.files?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.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
fireFileDeleted(mParameters?): sap.m.UploadCollection
Fires event fileDeleted to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.documentId?A unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.
sap.m.UploadCollectionItemmParameters.item?An item to be deleted from the collection. Since version 1.28.0.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
fireFilenameLengthExceed(mParameters?): sap.m.UploadCollection
Fires event filenameLengthExceed to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.documentId?A unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
object[]mParameters.files?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.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
fireFileRenamed(mParameters?): sap.m.UploadCollection
Fires event fileRenamed to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.documentId?A unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.
stringmParameters.fileName?The new file name. This parameter is deprecated since version 1.28.0, use parameter item instead.
sap.m.UploadCollectionItemmParameters.item?The renamed UI element as an UploadCollectionItem. Since version 1.28.0.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
fireFileSizeExceed(mParameters?): sap.m.UploadCollection
Fires event fileSizeExceed to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.documentId?A unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
stringmParameters.fileSize?The size in MB of a file to be uploaded. This parameter is deprecated since version 1.28.0, use parameter files instead.
object[]mParameters.files?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.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
fireSelectionChange(mParameters?): sap.m.UploadCollection
Fires event selectionChange to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.m.UploadCollectionItemmParameters.selectedItem?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.
sap.m.UploadCollectionItem[]mParameters.selectedItems?Array of items whose selection has changed. This parameter can be used for MultiSelect mode.
booleanmParameters.selected?Indicates whether the listItem parameter is selected or not.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.36.0
fireTypeMissmatch(mParameters?): sap.m.UploadCollection
Fires event typeMissmatch to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.documentId?A unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
stringmParameters.fileType?File type. This parameter is deprecated since version 1.28.0, use parameter files instead.
stringmParameters.mimeType?MIME type. This parameter is deprecated since version 1.28.0, use parameter files instead.
object[]mParameters.files?A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file. Since version 1.28.0.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
fireUploadComplete(mParameters?): sap.m.UploadCollection
Fires event uploadComplete to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.readyStateXHR?Ready state XHR. This parameter is deprecated since version 1.28.0., use parameter files instead.
stringmParameters.response?Response of the completed upload request. This parameter is deprecated since version 1.28.0., use parameter files instead.
stringmParameters.status?Status Code of the completed upload event. This parameter is deprecated since version 1.28.0., use parameter files instead.
object[]mParameters.files?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. reponse : deprecated Since version 1.48.0. This parameter is deprecated, use parameter response instead. 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.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
fireUploadTerminated(mParameters?): sap.m.UploadCollection
Fires event uploadTerminated to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.fileName?Specifies the name of the file of which the upload is to be terminated.
functionmParameters.getHeaderParameter?This callback function returns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
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
getHeaderParameters(): sap.m.UploadCollectionParameter[]

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:
sap.m.UploadCollectionParameter[]
getInfoToolbar(): sap.m.Toolbar

Gets content of aggregation infoToolbar.

Specifies the info toolbar for filtering information. Sorting information will not displayed.

Returns:
sap.m.Toolbar
Since:
1.44
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.

Returns:
booleanValue of property instantUpload
Since:
1.30

Gets content of aggregation items.

Uploaded items.

Returns:
sap.m.UploadCollectionItem[]
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:
intValue 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:
floatValue 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
getMode(): sap.m.ListMode

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.

Returns:
sap.m.ListModeValue of property mode
Since:
1.34
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.

If multiple property is set to false, the control shows an error message if more than one file is chosen for drag & drop.

Default value is false.

Returns:
booleanValue of property multiple
getNoDataDescription(): string

Gets current value of property noDataDescription.

Allows you to set your own text for the 'No data' description label.

Returns:
stringValue of property noDataDescription
Since:
1.46.0
getNoDataText(): string

Gets current value of property noDataText.

Allows you to set your own text for the 'No data' text label.

Returns:
stringValue 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)".

Returns:
stringValue of property numberOfAttachmentsText
Since:
1.30

Gets content of aggregation parameters.

Specifies the parameters for the FileUploader that are rendered as a hidden input field.

Returns:
sap.m.UploadCollectionParameter[]
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:
booleanValue of property sameFilenameAllowed
getSelectedItem(): sap.m.UploadCollectionItem
Returns selected UploadCollectionItem.
Returns:
sap.m.UploadCollectionItemselected item
Since:
1.34
getSelectedItems(): sap.m.UploadCollectionItem[]
Returns an array containing the selected UploadCollectionItems.
Returns:
sap.m.UploadCollectionItem[]array with selected items
Since:
1.34
getShowSeparators(): sap.m.ListSeparators

Gets current value of property showSeparators.

Defines whether separators are shown between list items.

Default value is All.

Returns:
sap.m.ListSeparatorsValue of property showSeparators
getTerminationEnabled(): boolean

Gets current value of property terminationEnabled.

If true, the button that is used to terminate the instant file upload gets visible. The button normally appears when a file is being uploaded.

Default value is true.

Returns:
booleanValue of property terminationEnabled
Since:
1.42.0
getToolbar(): sap.m.OverflowToolbar

Gets content of aggregation toolbar.

Specifies the toolbar.

Returns:
sap.m.OverflowToolbar
Since:
1.34
getUploadButtonInvisible(): boolean

Gets current value of property uploadButtonInvisible.

If true, the button used for uploading files is invisible.

Default value is false.

Returns:
booleanValue of property uploadButtonInvisible
Since:
1.42.0
getUploadEnabled(): boolean

Gets current value of property uploadEnabled.

Enables the upload of a file.

Default value is true.

Returns:
booleanValue 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:
stringValue 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:
sap.m.UploadCollectionParameteroHeaderParameterThe headerParameter whose index is looked for
Returns:
intThe 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:
sap.m.UploadCollectionItemoItemThe item whose index is looked for
Returns:
intThe 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:
sap.m.UploadCollectionParameteroParameterThe parameter whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
insertHeaderParameter(oHeaderParameter, iIndex): sap.m.UploadCollection
Inserts a headerParameter into the aggregation headerParameters.
Parameters:
sap.m.UploadCollectionParameteroHeaderParameterthe headerParameter to insert; if empty, nothing is inserted
intiIndexthe 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:
sap.m.UploadCollectionReference to this in order to allow method chaining
insertItem(oItem, iIndex): sap.m.UploadCollection
Inserts a item into the aggregation items.
Parameters:
sap.m.UploadCollectionItemoItemthe item to insert; if empty, nothing is inserted
intiIndexthe 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:
sap.m.UploadCollectionReference to this in order to allow method chaining
insertParameter(oParameter, iIndex): sap.m.UploadCollection
Inserts a parameter into the aggregation parameters.
Parameters:
sap.m.UploadCollectionParameteroParameterthe parameter to insert; if empty, nothing is inserted
intiIndexthe 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:
sap.m.UploadCollectionReference to this in order to allow method chaining
openFileDialog(item): sap.m.UploadCollection
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:
sap.m.UploadCollectionItemitemThe item to update with a new version. This parameter is mandatory.
Returns:
sap.m.UploadCollectionTo ensure method chaining, return the UploadCollection.
Since:
1.38.0
removeAllHeaderParameters(): sap.m.UploadCollectionParameter[]

Removes all the controls from the aggregation headerParameters.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.UploadCollectionParameter[]An array of the removed elements (might be empty)
removeAllItems(): sap.m.UploadCollectionItem[]

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.UploadCollectionItem[]An array of the removed elements (might be empty)
removeAllParameters(): sap.m.UploadCollectionParameter[]

Removes all the controls from the aggregation parameters.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.UploadCollectionParameter[]An array of the removed elements (might be empty)
removeHeaderParameter(vHeaderParameter): sap.m.UploadCollectionParameter
Removes a headerParameter from the aggregation headerParameters.
Parameters:
int|string|sap.m.UploadCollectionParametervHeaderParameterThe headerParameter to remove or its index or id
Returns:
sap.m.UploadCollectionParameterThe removed headerParameter or null
removeItem(vItem): sap.m.UploadCollectionItem
Removes a item from the aggregation items.
Parameters:
int|string|sap.m.UploadCollectionItemvItemThe item to remove or its index or id
Returns:
sap.m.UploadCollectionItemThe removed item or null
removeParameter(vParameter): sap.m.UploadCollectionParameter
Removes a parameter from the aggregation parameters.
Parameters:
int|string|sap.m.UploadCollectionParametervParameterThe parameter to remove or its index or id
Returns:
sap.m.UploadCollectionParameterThe removed parameter or null
Select all items in "MultiSelection" mode.
Returns:
sap.m.UploadCollectionThe current UploadCollection
Since:
1.34
setFileType(sFileType): sap.m.UploadCollection

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[]sFileTypeNew value for property fileType
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setInfoToolbar(oInfoToolbar): sap.m.UploadCollection
Sets the aggregated infoToolbar.
Parameters:
sap.m.ToolbaroInfoToolbarThe infoToolbar to set
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.44
setInstantUpload(bInstantUpload): sap.m.UploadCollection

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:
booleanbInstantUploadNew value for property instantUpload
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.30
setMaximumFilenameLength(iMaximumFilenameLength): sap.m.UploadCollection

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:
intiMaximumFilenameLengthNew value for property maximumFilenameLength
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setMaximumFileSize(fMaximumFileSize): sap.m.UploadCollection

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:
floatfMaximumFileSizeNew value for property maximumFileSize
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setMimeType(sMimeType): sap.m.UploadCollection

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[]sMimeTypeNew value for property mimeType
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setMode(sMode): sap.m.UploadCollection

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:
sap.m.ListModesModeNew value for property mode
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.34
setMultiple(bMultiple): sap.m.UploadCollection

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.

If multiple property is set to false, the control shows an error message if more than one file is chosen for drag & drop.

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

Default value is false.

Parameters:
booleanbMultipleNew value for property multiple
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setNoDataDescription(sNoDataDescription): sap.m.UploadCollection

Sets a new value for property noDataDescription.

Allows you to set your own text for the 'No data' description label.

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

Parameters:
stringsNoDataDescriptionNew value for property noDataDescription
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.46.0
setNoDataText(sNoDataText): sap.m.UploadCollection

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:
stringsNoDataTextNew value for property noDataText
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setNumberOfAttachmentsText(sNumberOfAttachmentsText): sap.m.UploadCollection

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:
stringsNumberOfAttachmentsTextNew value for property numberOfAttachmentsText
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.30
setSameFilenameAllowed(bSameFilenameAllowed): sap.m.UploadCollection

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:
booleanbSameFilenameAllowedNew value for property sameFilenameAllowed
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setSelectedItem(uploadCollectionItem, select): sap.m.UploadCollection
Selects or deselects the given list item.
Parameters:
sap.m.UploadCollectionItemuploadCollectionItemThe item whose selection to be changed. This parameter is mandatory.
booleanselectSets selected status of the item. Default value is true.
Returns:
sap.m.UploadCollectionThe current UploadCollection
Since:
1.34
setSelectedItemById(id, select): sap.m.UploadCollection
Sets an UploadCollectionItem to be selected by id. In single mode, the method removes the previous selection.
Parameters:
stringidThe id of the item whose selection to be changed.
booleanselectSets selected status of the item. Default value is true.
Returns:
sap.m.UploadCollectionThe current UploadCollection
Since:
1.34
setShowSeparators(sShowSeparators): sap.m.UploadCollection

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:
sap.m.ListSeparatorssShowSeparatorsNew value for property showSeparators
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setTerminationEnabled(bTerminationEnabled): sap.m.UploadCollection

Sets a new value for property terminationEnabled.

If true, the button that is used to terminate the instant file upload gets visible. The button normally appears when a file is being uploaded.

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

Default value is true.

Parameters:
booleanbTerminationEnabledNew value for property terminationEnabled
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.42.0
setToolbar(oToolbar): sap.m.UploadCollection
Sets the aggregated toolbar.
Parameters:
sap.m.OverflowToolbaroToolbarThe toolbar to set
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.34
setUploadButtonInvisible(bUploadButtonInvisible): sap.m.UploadCollection

Sets a new value for property uploadButtonInvisible.

If true, the button used for uploading files is invisible.

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

Default value is false.

Parameters:
booleanbUploadButtonInvisibleNew value for property uploadButtonInvisible
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
Since:
1.42.0
setUploadEnabled(bUploadEnabled): sap.m.UploadCollection

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:
booleanbUploadEnabledNew value for property uploadEnabled
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
setUploadUrl(sUploadUrl): sap.m.UploadCollection

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:
stringsUploadUrlNew value for property uploadUrl
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
unbindItems(): sap.m.UploadCollection
Unbinds aggregation items from model data.
Returns:
sap.m.UploadCollectionReference to this in order to allow method chaining
upload(): void
Starts the upload for all selected files.
Since:
1.30