Class sap.ui2.srvc.Chip
Defined in: chip.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
sap.ui2.srvc.Chip(oAlterEgo, oFactory)
Constructs a new representation (wrapper) of the CHIP with the given CHIP data as loaded from
the page building service.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
sap.ui2.srvc.Chip.addContract(sName, fnInitializer)
Adds a contract to the list of known contracts which can be consumed by CHIPs.
|
|
createApi(oChipInstance, oContractsByName)
Creates the API object for a CHIP instance.
|
|
|
Returns the id of this CHIP's base CHIP as defined by the page building service.
|
|
|
Returns the catalog by which this CHIP was loaded.
|
|
|
Gets the value of a configuration parameter.
|
|
|
Returns this CHIP's description as defined by the page building service.
|
|
|
getId()
Returns this CHIP's ID.
|
|
|
Returns this CHIP instance's implementation of type SAPUI5 as a control.
|
|
|
Returns the catalog by which this remote CHIP was loaded.
|
|
|
getTitle()
Returns this CHIP's title as defined by the page building service or the CHIP definition XML
(if available).
|
|
|
isBasedOn(oChipInstance)
Checks whether this CHIP is based on the given CHIP instance.
|
|
|
Tells whether this CHIP is a broken reference,
as indicated by referenceChipId being set to "O" (Orphaned)
|
|
|
Tells whether this CHIP is a reference, pointing to its original CHIP.
|
|
|
isStub()
Tells whether this CHIP is still only a stub and does not yet know its CHIP definition XML.
|
|
|
load(fnSuccess, fnFailure)
Loads the CHIP definition XML in case this has not yet been done.
|
|
|
refresh(fnSuccess, fnFailure)
Refreshes the CHIP from the OData service.
|
|
|
toAbsoluteUrl(sUrl)
Makes the given relative URL absolute.
|
|
|
toString(bVerbose)
Returns this CHIP's string representation.
|
|
|
updateConfiguration(mParameters, vConfigurationUpdates)
Updates the given parameter map from the given JSON string.
|
Initially a stub is created which can load its CHIP definition XML later on in an asynchronous fashion.
CHIPs are currently read-only and cannot be updated through the page building service. (see sap.ui2.srvc.PageBuildingService)
- Parameters:
- {object} oAlterEgo
- the CHIP data as loaded via page building service
- {sap.ui2.srvc.Factory} oFactory
- the factory
- Since:
- 1.2.0
- Parameters:
- {string} sName
- The name of the contract.
- {function (sap.ui2.srvc.ChipInstance)} fnInitializer
- This function will initialize the contract for a CHIP instance. When the API object for a
CHIP instance requesting this contract is initialized, a sub-object with the contract's name
is added to the API. The initializer is then called with this sub-object as
thisand the CHIP instance as parameter.
- Since:
- 1.2.0
- Parameters:
- {sap.ui2.srvc.ChipInstance} oChipInstance
- the CHIP instance
- {sap.ui2.srvc.Map} oContractsByName Optional
- CHIP instance's map from contract name to contract interface for page builder (since 1.11.0)
- Since:
- 1.2.0
- Returns:
- {object} the API object
- Since:
- 1.11.0
- Returns:
- {string} the id of this CHIP's base CHIP. Empty string in case the CHIP has no base CHIP.
- See:
- #isBasedOn()
undefined if the CHIP is only a proxy and the actual
instance has been deleted in the backend server. This may happen for
CHIPs referenced by a chip instance.
- Since:
- 1.19.0
- Returns:
- {sap.ui2.srvc.Catalog} this CHIP's catalog or
undefined
- Parameters:
- {string} sKey
- the name of the parameter
- Since:
- 1.2.0
- Returns:
- {string} the value of the parameter or
undefinedif it does not exist
- See:
- #isStub()
- Since:
- 1.2.0
- Returns:
- {string} this CHIP's description
- Since:
- 1.2.0
- Returns:
- {string} this CHIP's ID
- Parameters:
- {object} oApi
- the CHIP instance specific API
- Since:
- 1.2.0
- Returns:
- {sap.ui.core.Control} this CHIP instance's SAPUI5 implementation as a control
- See:
- #isStub()
undefined if the CHIP is from the same system as the catalog.
- Since:
- 1.9.0
- Returns:
- {sap.ui2.srvc.Catalog} this CHIP's remote catalog or
undefined
- Since:
- 1.2.0
- Returns:
- {string} this CHIP's title
Note: This CHIP's baseChipId is exactly non-empty if the CHIP is catalog-page
based. Then it is the ID of the CHIP used to build the CHIP instance. (This is recursive.
So if that CHIP is again catalog-page based...)
- Parameters:
- {sap.ui2.srvc.ChipInstance} oChipInstance
- the CHIP instance to compare with
- Since:
- 1.19.1
- Returns:
- {boolean}
trueiff the CHIP is based on the given CHIP instance
- See:
- #refresh()
- Since:
- 1.23.1
- Returns:
- {boolean} whether this CHIP is a broken reference
- Since:
- 1.19.1
- Returns:
- {boolean} whether this CHIP is a reference
- See:
- #refresh()
- Since:
- 1.2.0
- Returns:
- {boolean} whether this CHIP is still only a stub
- See:
- #load()
- Parameters:
- {function ()} fnSuccess
- no-args success handler
- {function (string|[object])} fnFailure Optional
- error handler taking an error message and, since version 1.28.6, an
optional object containing the complete error information as delivered
by the ODataService. See fnFailure parameter of sap.ui2.srvc.ODataWrapper#onError
for more details.
If not given
sap.ui2.srvc.ODataService#getDefaultErrorHandleris used.
- Since:
- 1.2.0
- See:
- #isStub()
This method is intended to refresh a CHIP in a catalog based on a catalog page. Such a CHIP is based on a CHIP instance of this catalog page. If such a CHIP instance is changed this method can be used to refresh the corresponding CHIP.
Note: This method does not replace the #load method, as the CHIP definition is not loaded. Thus, if the CHIP was a stub before the refresh, it is still a stub afterwards.
- Parameters:
- {function ()} fnSuccess
- no-args success handler
- {function (string|[object])} fnFailure Optional
- error handler taking an error message and, since version 1.28.6, an
optional object containing the complete error information as delivered
by the ODataService. See fnFailure parameter of sap.ui2.srvc.ODataWrapper#onError
for more details.
If not given
sap.ui2.srvc.ODataService#getDefaultErrorHandleris used
- Since:
- 1.16.5
- See:
- #load()
- #isStub()
- #isBasedOn()
- Parameters:
- {string} sUrl
- the (possibly server-relative) URL
- Since:
- 1.2.0
- Returns:
- {string} the absolute URL
- Parameters:
- {boolean} bVerbose Optional, Default: false
- flag whether to show all properties
- Since:
- 1.2.0
- Returns:
- {string} this CHIP's string representation
- Parameters:
-
{map
} mParameters - the parameter map to fill
-
{map
|string} vConfigurationUpdates - the configuration updates as parameter map or as JSON string
If one parameter value is
undefined(which can only happen by supplying a map) then this property is removed frommParameters.
- Since:
- 1.2.0