close

Filter

loading table of contents...

Studio Developer Manual / Version 2110

Table Of Contents

9.17.3 Configure a Singleton Work Area Tab

The previously shown OpenTabAction has an additional Boolean configuration parameter singleton. In the example a button that opens a CoreMediaTab is added, which is a browse tab with the fix URL of the CoreMedia homepage:

import Config from "@jangaroo/runtime/Config";
import EditorMainNavigationToolbar from "@coremedia/studio-client.main.editor-components/sdk/desktop/maintoolbar/EditorMainNavigationToolbar.ts"
import AddItemsPlugin from "@coremedia/studio-client.ext.ui-components/plugins/AddItemsPlugin";
import Button from "@jangaroo/ext-ts/button/Button";
import OpenTabAction from "@coremedia/studio-client.main.editor-components/sdk/actions/OpenTabAction";
import CoreMediaTab from "./CoreMediaTab";

Config(EditorMainNavigationToolbar, {
  plugins: [
    Config(AddItemsPlugin, {
      items: [
        //...
        Config(Button, {
          itemId: "coremediaTab",
          baseAction: new OpenTabAction({
            singleton: true,
            text: "...",
            tab: Config(CoreMediaTab),
          }),
        }),
      ],
      //...
    }),
  ],
})

Example 9.86. Adding a button to open a browser tab


In the work area there will be no more than one opened CoreMediaTab: When clicking the button the already opened CoreMediaTab will be active instead of opening a new one.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.