Item that represents one file to be uploaded using the sap.m.upload.UploadSet control.
Constructor for a new UploadSetItem.
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.UploadSetItem(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, will be generated automatically if no ID is provided. |
|
mSettings? | object | Initial settings for the new control. |
Name | Type | Default Value | Description |
---|---|---|---|
enabledEdit | boolean | true | Enables or disables the edit button. Visibility: public |
enabledRemove | boolean | true | Enables or disables the remove button. Visibility: public |
fileName | string | Specifies the name of the uploaded file. Visibility: public |
|
mediaType | string | Specifies the MIME type of the file. Visibility: public |
|
thumbnailUrl | string | Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL. Visibility: public |
|
uploadState | sap.m.UploadState | State of the item relevant to its upload process. Visibility: public |
|
uploadUrl | string | URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered. |
|
url | string | Specifies the URL where the file is located. |
|
visibleEdit | boolean | true | Shows or hides the edit button. Visibility: public |
visibleRemove | boolean | true | Shows or hides the remove button. Visibility: public |
Default Aggregation: attributes
Name | Cardinality | Type | Description |
---|---|---|---|
attributes (default) | 0..n | sap.m.ObjectAttribute |
Attributes of the item. |
headerFields | 0..n | sap.ui.core.Item |
Header fields to be included in the header section of an XMLHttpRequest (XHR) request |
markers | 0..n | sap.m.ObjectMarker |
Markers of the item. |
statuses | 0..n | sap.m.ObjectStatus |
Statuses of the item. |
Event | Description |
---|---|
openPressed |
This event is fired when an open action is invoked on an item. Listeners may prevent the default action of this event by calling the |
removePressed |
This event is fired when a remove action is invoked on an item. Listeners may prevent the default action of this event by calling the |
This event is fired when an open action is invoked on an item.
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 |
This event is fired when a remove action is invoked on an item.
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 |
Method | Description |
---|---|
addAttribute |
Adds some attribute to the aggregation attributes. |
addHeaderField |
Adds some headerField to the aggregation headerFields. |
addMarker |
Adds some marker to the aggregation markers. |
addStatus |
Adds some status to the aggregation statuses. |
attachOpenPressed |
Attaches event handler When called, the context of the event handler (its This event is fired when an open action is invoked on an item. |
attachRemovePressed |
Attaches event handler When called, the context of the event handler (its This event is fired when a remove action is invoked on an item. |
destroyAttributes |
Destroys all the attributes in the aggregation attributes. |
destroyHeaderFields |
Destroys all the headerFields in the aggregation headerFields. |
destroyMarkers |
Destroys all the markers in the aggregation markers. |
destroyStatuses |
Destroys all the statuses in the aggregation statuses. |
detachOpenPressed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachRemovePressed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
download |
Downloads the item. Only possible when the item has a valid URL specified in the |
sap.m.upload.UploadSetItem.extend |
Creates a new subclass of class sap.m.upload.UploadSetItem with name
|
fireOpenPressed |
Fires event openPressed to attached listeners. Listeners may prevent the default action of this event by calling the |
fireRemovePressed |
Fires event removePressed to attached listeners. Listeners may prevent the default action of this event by calling the |
getAttributes |
Gets content of aggregation attributes. Attributes of the item. |
getEnabledEdit |
Gets current value of property enabledEdit. Enables or disables the edit button. Default value is |
getEnabledRemove |
Gets current value of property enabledRemove. Enables or disables the remove button. Default value is |
getFileName |
Gets current value of property fileName. Specifies the name of the uploaded file. |
getFileObject |
Returns file object. |
getHeaderFields |
Gets content of aggregation headerFields. Header fields to be included in the header section of an XMLHttpRequest (XHR) request |
getListItem |
Returns list item. |
getMarkers |
Gets content of aggregation markers. Markers of the item. |
getMediaType |
Gets current value of property mediaType. Specifies the MIME type of the file. |
sap.m.upload.UploadSetItem.getMetadata |
Returns a metadata object for class sap.m.upload.UploadSetItem. |
getStatuses |
Gets content of aggregation statuses. Statuses of the item. |
getThumbnailUrl |
Gets current value of property thumbnailUrl. Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL. |
getUploadState |
Gets current value of property uploadState. State of the item relevant to its upload process. |
getUploadUrl |
Gets current value of property uploadUrl. URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered. |
getUrl |
Gets current value of property url. Specifies the URL where the file is located. |
getVisibleEdit |
Gets current value of property visibleEdit. Shows or hides the edit button. Default value is |
getVisibleRemove |
Gets current value of property visibleRemove. Shows or hides the remove button. Default value is |
indexOfAttribute |
Checks for the provided |
indexOfHeaderField |
Checks for the provided |
indexOfMarker |
Checks for the provided |
indexOfStatus |
Checks for the provided |
insertAttribute |
Inserts a attribute into the aggregation attributes. |
insertHeaderField |
Inserts a headerField into the aggregation headerFields. |
insertMarker |
Inserts a marker into the aggregation markers. |
insertStatus |
Inserts a status into the aggregation statuses. |
removeAllAttributes |
Removes all the controls from the aggregation attributes. Additionally, it unregisters them from the hosting UIArea. |
removeAllHeaderFields |
Removes all the controls from the aggregation headerFields. Additionally, it unregisters them from the hosting UIArea. |
removeAllMarkers |
Removes all the controls from the aggregation markers. Additionally, it unregisters them from the hosting UIArea. |
removeAllStatuses |
Removes all the controls from the aggregation statuses. Additionally, it unregisters them from the hosting UIArea. |
removeAttribute |
Removes a attribute from the aggregation attributes. |
removeHeaderField |
Removes a headerField from the aggregation headerFields. |
removeMarker |
Removes a marker from the aggregation markers. |
removeStatus |
Removes a status from the aggregation statuses. |
setEnabledEdit |
Sets a new value for property enabledEdit. Enables or disables the edit button. When called with a value of Default value is |
setEnabledRemove |
Sets a new value for property enabledRemove. Enables or disables the remove button. When called with a value of Default value is |
setFileName |
Sets a new value for property fileName. Specifies the name of the uploaded file. When called with a value of |
setMediaType |
Sets a new value for property mediaType. Specifies the MIME type of the file. When called with a value of |
setProgress |
Set current progress. |
setThumbnailUrl |
Sets a new value for property thumbnailUrl. Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL. When called with a value of |
setUploadState |
Sets a new value for property uploadState. State of the item relevant to its upload process. When called with a value of |
setUploadUrl |
Sets a new value for property uploadUrl. URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered. When called with a value of |
setUrl |
Sets a new value for property url. Specifies the URL where the file is located. When called with a value of |
setVisibleEdit |
Sets a new value for property visibleEdit. Shows or hides the edit button. When called with a value of Default value is |
setVisibleRemove |
Sets a new value for property visibleRemove. Shows or hides the remove button. When called with a value of Default value is |
Adds some attribute to the aggregation attributes.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAttribute | sap.m.ObjectAttribute |
The attribute to add; if empty, nothing is inserted |
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 marker to the aggregation markers.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMarker | sap.m.ObjectMarker |
The marker to add; if empty, nothing is inserted |
Adds some status to the aggregation statuses.
Param | Type | DefaultValue | Description |
---|---|---|---|
oStatus | sap.m.ObjectStatus |
The status to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the openPressed event of this sap.m.upload.UploadSetItem
.
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.UploadSetItem
itself.
This event is fired when an open action is invoked on an item.
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 removePressed event of this sap.m.upload.UploadSetItem
.
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.UploadSetItem
itself.
This event is fired when a remove action is invoked on an item.
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 openPressed event of this sap.m.upload.UploadSetItem
.
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 removePressed event of this sap.m.upload.UploadSetItem
.
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 |
Downloads the item. Only possible when the item has a valid URL specified in the url
property.
Param | Type | DefaultValue | Description |
---|---|---|---|
bAskForLocation | boolean |
Whether to ask for a location where to download the file or not. |
Creates a new subclass of class sap.m.upload.UploadSetItem with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Element.extend.
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 openPressed 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 |
Fires event removePressed 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 |
Gets current value of property enabledEdit.
Enables or disables the edit button.
Default value is true
.
Gets current value of property enabledRemove.
Enables or disables the remove button.
Default value is true
.
Gets content of aggregation headerFields.
Header fields to be included in the header section of an XMLHttpRequest (XHR) request
Returns a metadata object for class sap.m.upload.UploadSetItem.
Gets current value of property thumbnailUrl.
Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL.
Gets current value of property uploadState.
State of the item relevant to its upload process.
Gets current value of property uploadUrl.
URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered.
Gets current value of property url.
Specifies the URL where the file is located.
If the application doesn't provide a value for this property, the icon and the file name are not clickable in sap.m.upload.UploadSet.
Gets current value of property visibleEdit.
Shows or hides the edit button.
Default value is true
.
Gets current value of property visibleRemove.
Shows or hides the remove button.
Default value is true
.
Checks for the provided sap.m.ObjectAttribute
in the aggregation attributes. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAttribute | sap.m.ObjectAttribute |
The attribute whose index is looked for |
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.ObjectMarker
in the aggregation markers. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMarker | sap.m.ObjectMarker |
The marker whose index is looked for |
Checks for the provided sap.m.ObjectStatus
in the aggregation statuses. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oStatus | sap.m.ObjectStatus |
The status whose index is looked for |
Inserts a attribute into the aggregation attributes.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAttribute | sap.m.ObjectAttribute |
The attribute to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
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 marker into the aggregation markers.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMarker | sap.m.ObjectMarker |
The marker to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a status into the aggregation statuses.
Param | Type | DefaultValue | Description |
---|---|---|---|
oStatus | sap.m.ObjectStatus |
The status to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation attributes.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation headerFields.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation markers.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation statuses.
Additionally, it unregisters them from the hosting UIArea.
Removes a attribute from the aggregation attributes.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAttribute | int string sap.m.ObjectAttribute |
The attribute to remove or its index or id |
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 marker from the aggregation markers.
Param | Type | DefaultValue | Description |
---|---|---|---|
vMarker | int string sap.m.ObjectMarker |
The marker to remove or its index or id |
Removes a status from the aggregation statuses.
Param | Type | DefaultValue | Description |
---|---|---|---|
vStatus | int string sap.m.ObjectStatus |
The status to remove or its index or id |
Sets a new value for property enabledEdit.
Enables or disables the edit button.
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 |
---|---|---|---|
bEnabledEdit | boolean | true |
New value for property |
Sets a new value for property enabledRemove.
Enables or disables the remove button.
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 |
---|---|---|---|
bEnabledRemove | boolean | true |
New value for property |
Sets a new value for property fileName.
Specifies the name of the uploaded file.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFileName | string |
New value for property |
Sets a new value for property mediaType.
Specifies the MIME type of the file.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMediaType | string |
New value for property |
Set current progress.
Param | Type | DefaultValue | Description |
---|---|---|---|
iProgress | int |
Current progress. |
Sets a new value for property thumbnailUrl.
Specifies the URL where the thumbnail of the file is located. Can also be set to an SAPUI5 icon URL.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sThumbnailUrl | string |
New value for property |
Sets a new value for property uploadState.
State of the item relevant to its upload process.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sUploadState | sap.m.UploadState |
New value for property |
Sets a new value for property uploadUrl.
URL where the uploaded files will be stored. If empty, uploadUrl from the uploader is considered.
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 |
Sets a new value for property url.
Specifies the URL where the file is located.
If the application doesn't provide a value for this property, the icon and the file name are not clickable in sap.m.upload.UploadSet.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sUrl | string |
New value for property |
Sets a new value for property visibleEdit.
Shows or hides the edit button.
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 |
---|---|---|---|
bVisibleEdit | boolean | true |
New value for property |
Sets a new value for property visibleRemove.
Shows or hides the remove button.
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 |
---|---|---|---|
bVisibleRemove | boolean | true |
New value for property |