Namespace chip.preview
The namespace for the CHIP API's preview contract, which
allows to display the CHIP in a preview mode.
Defined in: preview.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
chip.preview.getDescription()
Returns this CHIP's description.
|
| <static> |
chip.preview.getTitle()
Returns this CHIP's title.
|
| <static> |
chip.preview.isEnabled()
Tells whether preview mode is enabled.
|
| <static> |
chip.preview.setPreviewIcon(sNewPreviewIconUrl)
Determines the preview icon to be used by the embedding application for this CHIP.
|
| <static> |
chip.preview.setPreviewSubtitle(sNewPreviewSubtitle)
Determines the preview subtitle to be used by the embedding application for this CHIP.
|
| <static> |
chip.preview.setPreviewTitle(sNewPreviewTitle)
Determines the preview title to be used by the embedding application for this CHIP.
|
| <static> |
chip.preview.setTargetUrl(sNewTargetUrl)
Determines the target URL for navigation from this CHIP.
|
Method Detail
<static>
{string}
chip.preview.getDescription()
Returns this CHIP's description. May be used by the CHIP for the UI it shows in preview
mode.
- Since:
- 1.11.0
- Returns:
- {string} the CHIP description
<static>
{string}
chip.preview.getTitle()
Returns this CHIP's title. May be used by the CHIP for the UI it shows in preview mode.
- Since:
- 1.11.0
- Returns:
- {string} the CHIP title
<static>
{boolean}
chip.preview.isEnabled()
Tells whether preview mode is enabled. Note that this value is constant throughout
a CHIP's lifetime. If preview mode is enabled, CHIPs should provide a target URL for the
embedding application to trigger navigation, see chip.preview.setTargetUrl.
They should not display live data for performance reasons.
- Since:
- 1.11.0
- Returns:
- {boolean} whether preview mode is enabled
<static>
chip.preview.setPreviewIcon(sNewPreviewIconUrl)
Determines the preview icon to be used by the embedding application for this CHIP.
- Parameters:
- {string} sNewPreviewIconUrl
- the preview icon URL. It is recommended that this URL follows the rules defined for the
srcattribute ofsap.ui.core.Icon.
- Since:
- 1.11.0
<static>
chip.preview.setPreviewSubtitle(sNewPreviewSubtitle)
Determines the preview subtitle to be used by the embedding application for this CHIP.
- Parameters:
- {string} sNewPreviewSubtitle
- the preview subtitle.
- Since:
- 1.40.0
<static>
chip.preview.setPreviewTitle(sNewPreviewTitle)
Determines the preview title to be used by the embedding application for this CHIP. If the
CHIP has no specific preview title e.g. based on its configuration it may return the title
from the
getTitle method of this contract.
- Parameters:
- {string} sNewPreviewTitle
- the preview title.
- Since:
- 1.11.0
<static>
chip.preview.setTargetUrl(sNewTargetUrl)
Determines the target URL for navigation from this CHIP. May be used by the embedding
application to trigger navigation to the CHIP's underlying application.
- Parameters:
- {string} sNewTargetUrl
- the target URL for navigation triggered in this CHIP
- Since:
- 1.11.0