Link action provider
Link action provider
Package: com.fliplet.link
Overview
The Link action provider allows users to configure actions that can be executed. The condition or trigger for executing the action depends on the provider caller. The Link action provider simply specifies the action that should be carried out. By using the Link action provider to configure this, any feature will be able to use the same UI and interactions to configure an action.
Usage
var provider = Fliplet.Widget.open('com.fliplet.link', {
selector: '#link-action',
data: {
actionLabel: 'Click action',
action: 'screen',
page: 123,
omitPages: [12],
options: {
hideAction: true
}
}
});
Parameters
The following parameters can be passed to Fliplet.Widget.open() using data as shown above.
actionLabel(String) Custom label for the action dropdown. Default:Link actionaction(String) The action to load into the link providerPossible values
screenDisplay another screenurlOpen a web pagedocumentOpen a documentvideoPlay a videorunFunctionCall a JavaScript Function
options(Object) A map of options for the provider.hideAction(Boolean) Set totrueto hide the action dropdown. If set totrue,actionshould also be provided to set theactionwithout a dropdown.
omitPages(Array) List of pages to omit if the user selects thescreenaction.
Return value
The provider object resolves with an action object that can be executed with Fliplet.Navigate.to() in apps and passed directly back to the provider during initialization.
Provider triggers
widget-autosize
Resize the provider size to fit the size of the content within.
Example
provider.emit('widget-autosize');
Provider events
widget-changedEvent is fired when the action value is changed.