Interface TabApi

This API provides the functionality related to tabs.

Accessed from the window at window.sas.vi.tab.

window.sas.vi.tab.openTab("objectName", "objectId");
interface TabApi {
    closeTab(objectType: string, objectId: string): Promise<boolean>;
    isOpenTabDirty(objectType: string, objectId: string): boolean;
    openTab(objectType: string, objectId: string, suppressNavigation?: boolean, mode?: PageModeEvent): Promise<void>;
    setOpenTabDirty(objectType: string, objectId: string, dirtyState: boolean): Promise<void>;
}

Methods

  • Parameters

    • objectType: string

      {string} Type of the object to be closed.

    • objectId: string

      {string} ID of the object to be closed.

    Returns Promise<boolean>

    A Promise resolving once the tab has been successfully removed (resolves to true) or once the tab could not be removed or found (resolving to false).

    Close the tab of a specified object.

  • Parameters

    • objectType: string

      {string} Tab's object type.

    • objectId: string

      {string} An open tab's object ID.

    Returns boolean

    true/false if the tab is dirty/not.

    Checks to see if an open tab is dirty.

  • Parameters

    • objectType: string

      {string} Type of the object to be opened.

    • objectId: string

      {string} ID of the object to be opened.

    • OptionalsuppressNavigation: boolean

      {boolean} Allows the tab to be opened without navigating to it.

    • Optionalmode: PageModeEvent

      {PageModeEvent} Mode to open the tab in.

    Returns Promise<void>

    A Promise that resolves when the tab is opened.

    Opens the tab of a specified object.

  • Parameters

    • objectType: string

      {string} Open tab's object type.

    • objectId: string

      {string} Open tab's object ID.

    • dirtyState: boolean

      {boolean} Sets the tab's dirty state.

    Returns Promise<void>

    Sets the dirty state of an open tab.