This control allows you to upload one or more files from your devices (desktop, tablet, or phone) and attach them to your application.
This control builds on the sap.m.UploadCollection control, providing better handling of headers and requests, unified behavior of instant and deferred uploads, as well as improved progress indication.
Constructor for a new UploadSet.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.m.upload.UploadSet(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given. |
|
mSettings? | object | Initial settings for the new control. |
Name | Type | Default Value | Description |
---|---|---|---|
fileTypes | string[] | Allowed file types for files to be uploaded. |
|
httpRequestMethod | sap.m.upload.UploaderHttpRequestMethod | Post | HTTP request method chosen for file upload. |
instantUpload | boolean | true | Defines whether the upload process should be triggered as soon as the file is added. |
maxFileNameLength | int | Maximum length of names of files to be uploaded. |
|
maxFileSize | float | Size limit in megabytes for files to be uploaded. |
|
mediaTypes | string[] | Allowed media types for files to be uploaded. |
|
noDataDescription | string | Defines custom text for the 'No data' description label. Visibility: public |
|
noDataText | string | Defines custom text for the 'No data' text label. Visibility: public |
|
showIcons | boolean | true | Defines whether file icons should be displayed. Visibility: public |
terminationEnabled | boolean | true | Defines whether it is allowed to terminate the upload process. Visibility: public |
uploadEnabled | boolean | true | Defines whether the upload action is allowed. Visibility: public |
uploadUrl | string | URL where the uploaded files will be stored. Visibility: public |
Default Aggregation: items
Name | Cardinality | Type | Description |
---|---|---|---|
headerFields | 0..n | sap.ui.core.Item |
Header fields to be included in the header section of an XHR request. |
incompleteItems | 0..n | sap.m.upload.UploadSetItem |
Items representing files yet to be uploaded. |
items (default) | 0..n | sap.m.upload.UploadSetItem |
Items representing files that have already been uploaded. |
toolbar | 0..1 | sap.m.OverflowToolbar |
Main toolbar of the |
uploader | 0..1 | sap.m.upload.Uploader |
Defines the uploader to be used. If not specified, the default implementation is used. |
Event | Description |
---|---|
afterItemAdded |
This event is fired when a new file is added to the set of items to be uploaded. |
afterItemEdited |
This event is fired after item edit is confirmed. |
afterItemRemoved |
This event is fired after the item is removed on click of ok button in confirmation dialog. |
beforeItemAdded |
This event is fired just before a new file is added to the set of items to be uploaded. Listeners may prevent the default action of this event by calling the |
beforeItemEdited |
This event is fired when the edit button is clicked for an item and no other item is being edited at the same time. Listeners may prevent the default action of this event by calling the |
beforeItemRemoved |
This event is fired just before the confirmation dialog for 'Remove' action is displayed. Listeners may prevent the default action of this event by calling the |
beforeUploadStarts |
This event is fired right before the upload process begins. Listeners may prevent the default action of this event by calling the |
beforeUploadTermination |
This event is fired right before the upload is terminated. Listeners may prevent the default action of this event by calling the |
fileNameLengthExceeded |
This event is fired in either of the following cases:
|
fileSizeExceeded |
This event is fired in either of the following cases:
|
fileTypeMismatch |
This event is fired in either of the following cases:
|
mediaTypeMismatch |
This event is fired in either of the following cases:
|
selectionChanged |
This event is fired simultaneously with the respective event in the inner sap.m.List control. |
uploadCompleted |
This event is fired right after the upload process is finished. |
uploadTerminated |
This event is fired right after the upload is terminated. |
This event is fired when a new file is added to the set of items to be uploaded.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The file that has just been added. |
This event is fired after item edit is confirmed.
Since: 1.83.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The item edited. |
This event is fired after the item is removed on click of ok button in confirmation dialog.
Since: 1.83.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The item removed from the set of items to be uploaded. |
This event is fired just before a new file is added to the set of items to be uploaded.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The file to be added to the set of items to be uploaded. |
This event is fired when the edit button is clicked for an item and no other item is being edited at the same time.
If there is another item that has unsaved changes, the editing of the clicked item cannot be started.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The item to be edited. |
This event is fired just before the confirmation dialog for 'Remove' action is displayed.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The item to be removed from the set of items to be uploaded. |
This event is fired right before the upload process begins.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The file whose upload is just about to start. |
This event is fired right before the upload is terminated.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The file whose upload is about to be terminated. |
This event is fired in either of the following cases:
maxFileNameLength
property.Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The file that fails to meet the file name length restriction specified in the |
This event is fired in either of the following cases:
maxFileSize
property.Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The file that fails to meet the file size restriction specified in the |
This event is fired in either of the following cases:
fileType
property).Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The file that fails to meet the file type restriction specified in the |
This event is fired in either of the following cases:
mediaTypes
property.Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
item | sap.m.upload.UploadSetItem |
The file that fails to meet the media type restriction specified in the |
This event is fired simultaneously with the respective event in the inner sap.m.List control.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
items | sap.m.upload.UploadSetItem[] |
Items whose selection status has just been changed. |
Method | Description |
---|---|
addHeaderField |
Adds some headerField to the aggregation headerFields. |
addIncompleteItem |
Adds some incompleteItem to the aggregation incompleteItems. |
addItem |
Adds some item to the aggregation items. |
attachAfterItemAdded |
Attaches event handler When called, the context of the event handler (its This event is fired when a new file is added to the set of items to be uploaded. |
attachAfterItemEdited |
Attaches event handler When called, the context of the event handler (its This event is fired after item edit is confirmed. |
attachAfterItemRemoved |
Attaches event handler When called, the context of the event handler (its This event is fired after the item is removed on click of ok button in confirmation dialog. |
attachBeforeItemAdded |
Attaches event handler When called, the context of the event handler (its This event is fired just before a new file is added to the set of items to be uploaded. |
attachBeforeItemEdited |
Attaches event handler When called, the context of the event handler (its This event is fired when the edit button is clicked for an item and no other item is being edited at the same time. |
attachBeforeItemRemoved |
Attaches event handler When called, the context of the event handler (its This event is fired just before the confirmation dialog for 'Remove' action is displayed. |
attachBeforeUploadStarts |
Attaches event handler When called, the context of the event handler (its This event is fired right before the upload process begins. |
attachBeforeUploadTermination |
Attaches event handler When called, the context of the event handler (its This event is fired right before the upload is terminated. |
attachFileNameLengthExceeded |
Attaches event handler When called, the context of the event handler (its This event is fired in either of the following cases:
|
attachFileSizeExceeded |
Attaches event handler When called, the context of the event handler (its This event is fired in either of the following cases:
|
attachFileTypeMismatch |
Attaches event handler When called, the context of the event handler (its This event is fired in either of the following cases:
|
attachMediaTypeMismatch |
Attaches event handler When called, the context of the event handler (its This event is fired in either of the following cases:
|
attachSelectionChanged |
Attaches event handler When called, the context of the event handler (its This event is fired simultaneously with the respective event in the inner sap.m.List control. |
attachUploadCompleted |
Attaches event handler When called, the context of the event handler (its This event is fired right after the upload process is finished. |
attachUploadTerminated |
Attaches event handler When called, the context of the event handler (its This event is fired right after the upload is terminated. |
destroyHeaderFields |
Destroys all the headerFields in the aggregation headerFields. |
destroyIncompleteItems |
Destroys all the incompleteItems in the aggregation incompleteItems. |
destroyItems |
Destroys all the items in the aggregation items. |
destroyToolbar |
Destroys the toolbar in the aggregation toolbar. |
destroyUploader |
Destroys the uploader in the aggregation uploader. |
detachAfterItemAdded |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachAfterItemEdited |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachAfterItemRemoved |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeItemAdded |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeItemEdited |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeItemRemoved |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeUploadStarts |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeUploadTermination |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFileNameLengthExceeded |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFileSizeExceeded |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFileTypeMismatch |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachMediaTypeMismatch |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelectionChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachUploadCompleted |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachUploadTerminated |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.upload.UploadSet.extend |
Creates a new subclass of class sap.m.upload.UploadSet with name
|
fireAfterItemAdded |
Fires event afterItemAdded to attached listeners. |
fireAfterItemEdited |
Fires event afterItemEdited to attached listeners. |
fireAfterItemRemoved |
Fires event afterItemRemoved to attached listeners. |
fireBeforeItemAdded |
Fires event beforeItemAdded to attached listeners. Listeners may prevent the default action of this event by calling the |
fireBeforeItemEdited |
Fires event beforeItemEdited to attached listeners. Listeners may prevent the default action of this event by calling the |
fireBeforeItemRemoved |
Fires event beforeItemRemoved to attached listeners. Listeners may prevent the default action of this event by calling the |
fireBeforeUploadStarts |
Fires event beforeUploadStarts to attached listeners. Listeners may prevent the default action of this event by calling the |
fireBeforeUploadTermination |
Fires event beforeUploadTermination to attached listeners. Listeners may prevent the default action of this event by calling the |
fireFileNameLengthExceeded |
Fires event fileNameLengthExceeded to attached listeners. |
fireFileSizeExceeded |
Fires event fileSizeExceeded to attached listeners. |
fireFileTypeMismatch |
Fires event fileTypeMismatch to attached listeners. |
fireMediaTypeMismatch |
Fires event mediaTypeMismatch to attached listeners. |
fireSelectionChanged |
Fires event selectionChanged to attached listeners. |
fireUploadCompleted |
Fires event uploadCompleted to attached listeners. |
fireUploadTerminated |
Fires event uploadTerminated to attached listeners. |
getDefaultFileUploader |
Returns an instance of the default |
getFileTypes |
Gets current value of property fileTypes. Allowed file types for files to be uploaded. |
getHeaderFields |
Gets content of aggregation headerFields. Header fields to be included in the header section of an XHR request. |
getHttpRequestMethod |
Gets current value of property httpRequestMethod. HTTP request method chosen for file upload. Default value is |
getIncompleteItems |
Gets content of aggregation incompleteItems. Items representing files yet to be uploaded. |
getInstantUpload |
Gets current value of property instantUpload. Defines whether the upload process should be triggered as soon as the file is added. Default value is |
getItems |
Gets content of aggregation items. Items representing files that have already been uploaded. |
getList |
Provides access to the instance of the inner sap.m.List control, so that it can be customized. |
getMaxFileNameLength |
Gets current value of property maxFileNameLength. Maximum length of names of files to be uploaded. |
getMaxFileSize |
Gets current value of property maxFileSize. Size limit in megabytes for files to be uploaded. |
getMediaTypes |
Gets current value of property mediaTypes. Allowed media types for files to be uploaded. |
sap.m.upload.UploadSet.getMetadata |
Returns a metadata object for class sap.m.upload.UploadSet. |
getNoDataDescription |
Gets current value of property noDataDescription. Defines custom text for the 'No data' description label. |
getNoDataText |
Gets current value of property noDataText. Defines custom text for the 'No data' text label. |
getShowIcons |
Gets current value of property showIcons. Defines whether file icons should be displayed. Default value is |
getTerminationEnabled |
Gets current value of property terminationEnabled. Defines whether it is allowed to terminate the upload process. Default value is |
getToolbar |
Gets content of aggregation toolbar. Main toolbar of the |
getUploadEnabled |
Gets current value of property uploadEnabled. Defines whether the upload action is allowed. Default value is |
getUploader |
Gets content of aggregation uploader. Defines the uploader to be used. If not specified, the default implementation is used. |
getUploadUrl |
Gets current value of property uploadUrl. URL where the uploaded files will be stored. |
indexOfHeaderField |
Checks for the provided |
indexOfIncompleteItem |
Checks for the provided |
indexOfItem |
Checks for the provided |
insertHeaderField |
Inserts a headerField into the aggregation headerFields. |
insertIncompleteItem |
Inserts a incompleteItem into the aggregation incompleteItems. |
insertItem |
Inserts a item into the aggregation items. |
registerUploaderEvents |
Attaches all necessary handlers to the given uploader instance, so that the progress and status of the upload can be displayed and monitored. |
removeAllHeaderFields |
Removes all the controls from the aggregation headerFields. Additionally, it unregisters them from the hosting UIArea. |
removeAllIncompleteItems |
Removes all the controls from the aggregation incompleteItems. Additionally, it unregisters them from the hosting UIArea. |
removeAllItems |
Removes all the controls from the aggregation items. Additionally, it unregisters them from the hosting UIArea. |
removeHeaderField |
Removes a headerField from the aggregation headerFields. |
removeIncompleteItem |
Removes a incompleteItem from the aggregation incompleteItems. |
removeItem |
Removes a item from the aggregation items. |
setFileTypes |
Sets a new value for property fileTypes. Allowed file types for files to be uploaded. When called with a value of |
setHttpRequestMethod |
Sets a new value for property httpRequestMethod. HTTP request method chosen for file upload. When called with a value of Default value is |
setInstantUpload |
Sets a new value for property instantUpload. Defines whether the upload process should be triggered as soon as the file is added. When called with a value of Default value is |
setMaxFileNameLength |
Sets a new value for property maxFileNameLength. Maximum length of names of files to be uploaded. When called with a value of |
setMaxFileSize |
Sets a new value for property maxFileSize. Size limit in megabytes for files to be uploaded. When called with a value of |
setMediaTypes |
Sets a new value for property mediaTypes. Allowed media types for files to be uploaded. When called with a value of |
setNoDataDescription |
Sets a new value for property noDataDescription. Defines custom text for the 'No data' description label. When called with a value of |
setNoDataText |
Sets a new value for property noDataText. Defines custom text for the 'No data' text label. When called with a value of |
setShowIcons |
Sets a new value for property showIcons. Defines whether file icons should be displayed. When called with a value of Default value is |
setTerminationEnabled |
Sets a new value for property terminationEnabled. Defines whether it is allowed to terminate the upload process. When called with a value of Default value is |
setToolbar |
Sets the aggregated toolbar. |
setUploadEnabled |
Sets a new value for property uploadEnabled. Defines whether the upload action is allowed. When called with a value of Default value is |
setUploader |
Sets the aggregated uploader. |
setUploadUrl |
Sets a new value for property uploadUrl. URL where the uploaded files will be stored. When called with a value of |
upload |
Starts uploading all files that comply with the restrictions defined in the |
uploadItem |
Starts uploading the file if it complies with the restrictions defined in the |
Adds some headerField to the aggregation headerFields.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeaderField | sap.ui.core.Item |
The headerField to add; if empty, nothing is inserted |
Adds some incompleteItem to the aggregation incompleteItems.
Param | Type | DefaultValue | Description |
---|---|---|---|
oIncompleteItem | sap.m.upload.UploadSetItem |
The incompleteItem to add; if empty, nothing is inserted |
Adds some item to the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.m.upload.UploadSetItem |
The item to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the afterItemAdded event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired when a new file is added to the set of items to be uploaded.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the afterItemEdited event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired after item edit is confirmed.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the afterItemRemoved event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired after the item is removed on click of ok button in confirmation dialog.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the beforeItemAdded event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired just before a new file is added to the set of items to be uploaded.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the beforeItemEdited event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired when the edit button is clicked for an item and no other item is being edited at the same time.
If there is another item that has unsaved changes, the editing of the clicked item cannot be started.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the beforeItemRemoved event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired just before the confirmation dialog for 'Remove' action is displayed.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the beforeUploadStarts event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired right before the upload process begins.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the beforeUploadTermination event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired right before the upload is terminated.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the fileNameLengthExceeded event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired in either of the following cases:
maxFileNameLength
property.Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the fileSizeExceeded event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired in either of the following cases:
maxFileSize
property.Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the fileTypeMismatch event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired in either of the following cases:
fileType
property).Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the mediaTypeMismatch event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired in either of the following cases:
mediaTypes
property.Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the selectionChanged event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired simultaneously with the respective event in the inner sap.m.List control.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the uploadCompleted event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired right after the upload process is finished.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the uploadTerminated event of this sap.m.upload.UploadSet
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.upload.UploadSet
itself.
This event is fired right after the upload is terminated.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the afterItemAdded event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the afterItemEdited event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the afterItemRemoved event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the beforeItemAdded event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the beforeItemEdited event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the beforeItemRemoved event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the beforeUploadStarts event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the beforeUploadTermination event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the fileNameLengthExceeded event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the fileSizeExceeded event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the fileTypeMismatch event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the mediaTypeMismatch event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the selectionChanged event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the uploadCompleted event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the uploadTerminated event of this sap.m.upload.UploadSet
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.m.upload.UploadSet 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event afterItemAdded to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file that has just been added. |
Fires event afterItemEdited to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The item edited. |
Fires event afterItemRemoved to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The item removed from the set of items to be uploaded. |
Fires event beforeItemAdded to attached listeners.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object. The return value of this method indicates whether the default action should be executed.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file to be added to the set of items to be uploaded. |
Fires event beforeItemEdited to attached listeners.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object. The return value of this method indicates whether the default action should be executed.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The item to be edited. |
Fires event beforeItemRemoved to attached listeners.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object. The return value of this method indicates whether the default action should be executed.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The item to be removed from the set of items to be uploaded. |
Fires event beforeUploadStarts to attached listeners.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object. The return value of this method indicates whether the default action should be executed.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file whose upload is just about to start. |
Fires event beforeUploadTermination to attached listeners.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object. The return value of this method indicates whether the default action should be executed.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file whose upload is about to be terminated. |
Fires event fileNameLengthExceeded to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file that fails to meet the file name length restriction specified in the |
Fires event fileSizeExceeded to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file that fails to meet the file size restriction specified in the |
Fires event fileTypeMismatch to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file that fails to meet the file type restriction specified in the |
Fires event mediaTypeMismatch to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file that fails to meet the media type restriction specified in the |
Fires event selectionChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
items | sap.m.upload.UploadSetItem[] |
Items whose selection status has just been changed. |
Fires event uploadCompleted to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file whose upload has just been completed. |
Fires event uploadTerminated to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
item | sap.m.upload.UploadSetItem |
The file whose upload has just been terminated. |
Returns an instance of the default sap.ui.unified.FileUploader
used for adding files using the operating system's open file dialog, so that it can be customized, for example made invisible or assigned a different icon.
Gets current value of property fileTypes.
Allowed file types for files to be uploaded.
If this property is not set, any file can be uploaded.
Gets content of aggregation headerFields.
Header fields to be included in the header section of an XHR request.
Gets current value of property httpRequestMethod.
HTTP request method chosen for file upload.
Default value is Post
.
Gets content of aggregation incompleteItems.
Items representing files yet to be uploaded.
Gets current value of property instantUpload.
Defines whether the upload process should be triggered as soon as the file is added.
If set to false
, no upload is triggered when a file is added.
Default value is true
.
Gets content of aggregation items.
Items representing files that have already been uploaded.
Provides access to the instance of the inner sap.m.List control, so that it can be customized.
Gets current value of property maxFileNameLength.
Maximum length of names of files to be uploaded.
If set to null
or 0
, any files can be uploaded, regardless of their names length.
Gets current value of property maxFileSize.
Size limit in megabytes for files to be uploaded.
If set to null
or 0
, files of any size can be uploaded.
Gets current value of property mediaTypes.
Allowed media types for files to be uploaded.
If this property is not set, any file can be uploaded.
Gets current value of property noDataDescription.
Defines custom text for the 'No data' description label.
Gets current value of property noDataText.
Defines custom text for the 'No data' text label.
Gets current value of property showIcons.
Defines whether file icons should be displayed.
Default value is true
.
Gets current value of property terminationEnabled.
Defines whether it is allowed to terminate the upload process.
Default value is true
.
Gets current value of property uploadEnabled.
Defines whether the upload action is allowed.
Default value is true
.
Gets content of aggregation uploader.
Defines the uploader to be used. If not specified, the default implementation is used.
Checks for the provided sap.ui.core.Item
in the aggregation headerFields. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeaderField | sap.ui.core.Item |
The headerField whose index is looked for |
Checks for the provided sap.m.upload.UploadSetItem
in the aggregation incompleteItems. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oIncompleteItem | sap.m.upload.UploadSetItem |
The incompleteItem whose index is looked for |
Checks for the provided sap.m.upload.UploadSetItem
in the aggregation items. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.m.upload.UploadSetItem |
The item whose index is looked for |
Inserts a headerField into the aggregation headerFields.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeaderField | sap.ui.core.Item |
The headerField to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a incompleteItem into the aggregation incompleteItems.
Param | Type | DefaultValue | Description |
---|---|---|---|
oIncompleteItem | sap.m.upload.UploadSetItem |
The incompleteItem to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a item into the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.m.upload.UploadSetItem |
The item to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Attaches all necessary handlers to the given uploader instance, so that the progress and status of the upload can be displayed and monitored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oUploader | sap.m.upload.Uploader |
Instance of |
Removes all the controls from the aggregation headerFields.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation incompleteItems.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
Removes a headerField from the aggregation headerFields.
Param | Type | DefaultValue | Description |
---|---|---|---|
vHeaderField | int string sap.ui.core.Item |
The headerField to remove or its index or id |
Removes a incompleteItem from the aggregation incompleteItems.
Param | Type | DefaultValue | Description |
---|---|---|---|
vIncompleteItem | int string sap.m.upload.UploadSetItem |
The incompleteItem to remove or its index or id |
Removes a item from the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
vItem | int string sap.m.upload.UploadSetItem |
The item to remove or its index or id |
Sets a new value for property fileTypes.
Allowed file types for files to be uploaded.
If this property is not set, any file can be uploaded.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFileTypes | string[] |
New value for property |
Sets a new value for property httpRequestMethod.
HTTP request method chosen for file upload.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Post
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHttpRequestMethod | sap.m.upload.UploaderHttpRequestMethod | Post |
New value for property |
Sets a new value for property instantUpload.
Defines whether the upload process should be triggered as soon as the file is added.
If set to false
, no upload is triggered when a file is added.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bInstantUpload | boolean | true |
New value for property |
Sets a new value for property maxFileNameLength.
Maximum length of names of files to be uploaded.
If set to null
or 0
, any files can be uploaded, regardless of their names length.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMaxFileNameLength | int |
New value for property |
Sets a new value for property maxFileSize.
Size limit in megabytes for files to be uploaded.
If set to null
or 0
, files of any size can be uploaded.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
fMaxFileSize | float |
New value for property |
Sets a new value for property mediaTypes.
Allowed media types for files to be uploaded.
If this property is not set, any file can be uploaded.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMediaTypes | string[] |
New value for property |
Sets a new value for property noDataDescription.
Defines custom 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sNoDataDescription | string |
New value for property |
Sets a new value for property noDataText.
Defines custom 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sNoDataText | string |
New value for property |
Sets a new value for property showIcons.
Defines whether file icons should be displayed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowIcons | boolean | true |
New value for property |
Sets a new value for property terminationEnabled.
Defines whether it is allowed to terminate the upload process.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bTerminationEnabled | boolean | true |
New value for property |
Sets the aggregated toolbar.
Param | Type | DefaultValue | Description |
---|---|---|---|
oToolbar | sap.m.OverflowToolbar |
The toolbar to set |
Sets a new value for property uploadEnabled.
Defines whether the upload action is allowed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bUploadEnabled | boolean | true |
New value for property |
Sets the aggregated uploader.
Param | Type | DefaultValue | Description |
---|---|---|---|
oUploader | sap.m.upload.Uploader |
The uploader to set |
Sets a new value for property uploadUrl.
URL where the uploaded files will be stored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sUploadUrl | string |
New value for property |