Atrium.launchItem( itemId, closable, callback )
Ā
This function launches a given navigation item as a tab in the portal. The item will launch using the settings that have been configured for it in the Add/Update navigation item form.
Parameters:
itemId -Ā a numeric value that represents the unique identifier for the item ā this value is displayed on the add/update navigation item form.
closable Ā - a Boolean value that indicates if the tab should contain a close button. Pass true for a tab with a close button, or false for a tab without a close button. This value defaults to true, if not specified.Ā
callback - a function that will be called after the tab has been created. The callback contains two parameters as well, success and tab.
Success - a Boolean that represents if the tab was created properly. The value will be true for success, false if an error occurred.
Tab - a reference to the tab object being launched.Ā
Example:
The following expression launches a closable tab with the id of 330. It also passes a callback function that will close the new tab in 5 seconds, using the Atrium.closeTab() API. Ā
Atrium.launchItem(330, true, function(success, tab) {
if (success === true){
setTimeout(function(){
Atrium.closeTab(tab);
}, 5000);
}
});
Ā
If this is being used within Atrium (i.e. under the /extension/atrium directory),Ā Atrium.api.launchItem() should be usedĀ instead.Ā
Ā