Skip to main content

AppIDs and window names

In Finsemble, every app has an AppID that is unique for that app type. An instance of an app has a windowName. These values aren't normally exposed to the end user. They are how Finsemble internally addresses each component.

title

The title is what displays in the AppLauncherMenu and what appears in the Toolbar when a user makes an app a favorite. It is set in the title field of an app's AppD record. This replaces displayName, which was used before version 7.0. displayName is still supported for backward compatibility.

note

AppD's name field has been deprecated in FDC3 2.0. For backward compatbility, Finsemble uses name if title is not provided.

windowIdentifier

App instances are often referred to in Finsemble API calls via a windowIdentifier. A windowIdentifier is an object can have either a windowName or componentType property.

A windowIdentifier is most commonly constructed as just a windowName.

let windowIdentifier = {
"windowName": "<windowName>",
};

Discovering a window's windowName

You might need to retrieve the current window's name to make Finsemble API calls that require a windowIdentifier. There are several ways to retrieve this a window's name.

  1. Retrieve a response from the FSBL.Clients.LauncherClient.spawn() call:
FSBL.Clients.LauncherClient.spawn(
"Welcome Component",
{addToWorkspace: true},
function(err, response) {
let newWindowIdentifier = response.windowIdentifier;
let newWindowName = newWindowIdentifier.windowName;
//do something with the windwIdentifier or windowName
...
}
);
  1. Retrieve the windowIdentifier inside the component itself:
let myWindowIdentifier = FSBL.Clients.WindowClient.getWindowIdentifier();
let myWindowName = myWindowIdentifier.windowName;
  1. Retrieve all active windowIdentifiers and look for the windowName in the response:
FSBL.Clients.LauncherClient.getActiveDescriptors(
function(err,descriptors){
console.log(descriptors)
}
);

You can also retrieve a component's type using FSBL.Clients.LauncherClient.getActiveDescriptors.

descriptors[<window name>].customData.component.type

See also

You can set a component's name using configuration; see the Config Reference for details.