A Link
control can be used to handle navigation scenarios with one or more targets through direct navigation or by opening a sap.ui.mdc.link.Panel.
It can also be used to display additional content, such as sap.ui.mdc.link.ContactDetails on the sap.ui.mdc.link.Panel. Note: Navigation targets are determined by the implementation of a sap.ui.mdc.LinkDelegate.
Constructor for the new Link
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.ui.mdc.Link(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 |
---|---|---|---|
delegate | object | ...see text or source | Path to |
enablePersonalization | boolean | true | Enables/disables the personalization settings for users and key users. Visibility: public |
Name | Type | Default Value | Description |
---|---|---|---|
delegate | object | Path to the |
Name | Cardinality | Type | Description |
---|---|---|---|
sourceControl | 0..1 | sap.ui.core.Control |
Gets the app component required for link personalization. Also, the source control is used to get the binding context. |
Method | Description |
---|---|
sap.ui.mdc.Link.extend |
Creates a new subclass of class sap.ui.mdc.Link with name
|
getContent |
Function that is called in the |
getDelegate |
Gets current value of property delegate. Path to Default value is |
getDirectLinkHrefAndTarget |
Returns an object containing |
getEnablePersonalization |
Gets current value of property enablePersonalization. Enables/disables the personalization settings for users and key users. Default value is |
sap.ui.mdc.Link.getMetadata |
Returns a metadata object for class sap.ui.mdc.Link. |
getSourceControl |
ID of the element which is the current target of the association sourceControl, or |
getTriggerHref |
Returns an |
isTriggerable |
Checks if |
retrieveAdditionalContent | |
sap.ui.mdc.Link.retrieveAllMetadata |
Retrieves the relevant metadata for the panel and returns a property info array. |
sap.ui.mdc.Link.retrieveBaseline |
Retrieves the items that are initially part of the baseline which is used when a reset is done. |
retrieveLinkItems |
Calls the |
retrieveLinkType | |
setDelegate |
Sets a new value for property delegate. Path to When called with a value of Default value is |
setEnablePersonalization |
Sets a new value for property enablePersonalization. Enables/disables the personalization settings for users and key users. When called with a value of Default value is |
setSourceControl |
Sets the associated sourceControl. |
Creates a new subclass of class sap.ui.mdc.Link 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.mdc.field.FieldInfoBase.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 |
Function that is called in the createPopover
function of sap.ui.mdc.field.FieldInfoBase.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnGetAutoClosedControl | function |
Function returning the |
Gets current value of property delegate.
Path to LinkDelegate
module that provides the required APIs to create content for the Link
control.
Note: Ensure that the related file can be requested (any required library has to be loaded before that).
Do not bind or modify the module. Once the required module is associated, this property might not be needed any longer.
Default value is ...see text or source
.
Returns an object containing href
and target
of the direct navigation. Returns null
if there is no direct link.
Gets current value of property enablePersonalization.
Enables/disables the personalization settings for users and key users.
Default value is true
.
ID of the element which is the current target of the association sourceControl, or null
.
Retrieves the relevant metadata for the panel and returns a property info array.
Param | Type | DefaultValue | Description |
---|---|---|---|
oPanel | sap.ui.mdc.link.Panel |
Instance of a |
Retrieves the items that are initially part of the baseline which is used when a reset is done.
Param | Type | DefaultValue | Description |
---|---|---|---|
oPanel | sap.ui.mdc.link.Panel |
Instance of a |
Calls the modifyLinkItems
function of Delegate
before returning the LinkItem
objects.
Sets a new value for property delegate.
Path to LinkDelegate
module that provides the required APIs to create content for the Link
control.
Note: Ensure that the related file can be requested (any required library has to be loaded before that).
Do not bind or modify the module. Once the required module is associated, this property might not be needed any longer.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is ...see text or source
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDelegate | object | ...see text or source |
New value for property |
Sets a new value for property enablePersonalization.
Enables/disables the personalization settings for users and key users.
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 |
---|---|---|---|
bEnablePersonalization | boolean | true |
New value for property |
Sets the associated sourceControl.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSourceControl | sap.ui.core.ID sap.ui.core.Control |
ID of an element which becomes the new target of this sourceControl association; alternatively, an element instance may be given |