This is documentation of an archived release.
For documentation on the current version, please check Knowledge Base.

Example : Enable Inventory Tools

This example assumes you have successfully embedded the component and validated the license.

The webclient has a minimal set of inventory tools that are disabled by default in the API context, because usually the host application implements these functions instead. This example shows you how to enable them again.

Steps to take :

  1. Listen for the publication to load.
  2. Enable the inventory tools.

1. Listen for the publication to load.

The Orbit WebClient Component dispatches an event when a publication loads succesfully.

client.getPanorama().addEventListener(orbit.webclient.LoadPublicationEvent.SUCCESS,
    function(e)
    {
        console.log("Publication was opened.");
    });

2. Enable the inventory tools.

Because the availability of the inventory tools is defined every time a publication is loaded,

client.addEventListener(orbit.webclient.LoadPublicationEvent.SUCCESS,
    function(e)
    {
        client.setSetting("AllowInventoryTools","true");
        console.log("Enabled inventory tools.");
    });
 
Last modified:: 2019/03/25 11:36