Namespace contract.preview
The namespace for the contract interface (to be used by a page builder) for
the preview contract, which allows you to display a CHIP in preview
mode and to retrieve the URL of the CHIP's underlying application.
"Preview mode" means that a CHIP does not retrieve and display live data, but displays a
static preview in order to improve performance.
The embedding application has two alternatives to display a CHIP preview:
Either it embeds the CHIP UI and relies on the CHIP not rendering live data or it
retrieves preview attributes like title and icon from the CHIP to create the preview UI
itself.
Defined in: preview.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
contract.preview.getPreviewIcon()
Returns the URL of the preview icon for this CHIP.
|
| <static> |
contract.preview.getPreviewSubtitle()
Returns the preview subtitle for this CHIP.
|
| <static> |
contract.preview.getPreviewTitle()
Returns the preview title for this CHIP.
|
| <static> |
contract.preview.getTargetUrl()
Returns the target URL for the CHIP's underlying application.
|
| <static> |
contract.preview.setEnabled(bNewEnabled)
Determines whether preview mode for this CHIP instance is enabled by the page builder.
|
Method Detail
<static>
{string}
contract.preview.getPreviewIcon()
Returns the URL of the preview icon for this CHIP.
- Since:
- 1.11.0
- Returns:
- {string} the preview icon's URL
<static>
{string}
contract.preview.getPreviewSubtitle()
Returns the preview subtitle for this CHIP.
- Since:
- 1.40.0
- Returns:
- {string} the preview subtitle
<static>
{string}
contract.preview.getPreviewTitle()
Returns the preview title for this CHIP.
- Since:
- 1.11.0
- Returns:
- {string} the preview title
<static>
{string}
contract.preview.getTargetUrl()
Returns the target URL for the CHIP's underlying application.
- Since:
- 1.11.0
- Returns:
- {string} target URL
<static>
contract.preview.setEnabled(bNewEnabled)
Determines whether preview mode for this CHIP instance is enabled by the page builder.
Note: Changing this setting after
getImplementationAsSapui5() has been
called probably violates the contract of chip.preview.isEnabled()!
- Parameters:
- {boolean} bNewEnabled
- whether preview mode for this CHIP instance is enabled by the page builder
- Since:
- 1.11.0