loading table of contents...

7.12.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:

...
<editor:favoritesToolbar>
  <plugins>
    <ui:addItemsPlugin>
      <ui:items>
        <!-- Add a button that opens the CoreMedia homepage browse tab as singleton -->
        <button itemId="coremediaTab">
          <baseAction>
            <editor:openTabAction singleton="true" text="...">
               <editor:tab>
                 <example:coreMediaTab/>
               </editor:tab>
             </editor:openTabAction>
          </baseAction>
        </button>
      </ui:items>
      ...
    </ui:addItemsPlugin>
  </plugins>
</editor:favoritesToolbar>
...

Example 7.48. 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.