Class: DialogManagerClient

Dialog Manager Client

The Dialog Manager client simplifies interacting with dialog windows, by spawning them and getting data back from them. In this contex, a dialog window is simply a child window spawned to interact with the user, such as a confirmation dialog. Functions are provided here for both the parent-window side and the dialog/child-window side.

FSBL.Clients.DialogManager is always pre-initialized with one instance of the Dialog Manager in the Finsemble Library (making it essentially, a singleton when referenced in the same window). This means component developers directly access the Dialog Manager without using the constructor (e.g., FSBL.Clients.DialogManager.spawnDialog(...);) -- the constructor is not exposed to components.



clients/dialogManagerClient.js, line 114

Called within dialog window to get the parameters passed in spawnDialog's "inputParams"

Name Type Description
dialogID any

identifies dialog to be terminated

Type Description
object inputParams parameters pass to dialog
var dialogData = FSBL.Clients.DialogManager.getParametersFromInDialog();


clients/dialogManagerClient.js, line 128

Called within dialog window to pass back dialog response and terminal window. This results in the spawnDialog callback function (i.e. dialogResponseCallback) being invoked with responseParameters passed in.

Name Type Description
responseParameters any

parameters returned to parent (i.e. window that spawned the dialog)

FSBL.Clients.DialogManager.respondAndExitFromInDialog({ choice: response });

(params, inputParams, dialogResponseCallback)

clients/dialogManagerClient.js, line 66

Spawns a Dialog window.

parameters pass here in inputParams can be retrieved in the dialog window by calling getParametersFromInDialog.

  • allow dialogs to be permanent components instead of ad-hoc.
  • support paramter to make the dialog modal
Name Type Description
params LauncherClient~windowDescriptor

the window descriptor representing a component or URL for the dialog

inputParams any

Object or any data type needed by your dialog.

dialogResponseCallback function

called when response received back from dialog window (typically on dialog completion). responseParameters is defined by the dialog.

dialogID can be used to kill a spawned dialog prematurely
		name: "dialogTemplate",
		someData: 12345
		function (error, responseParameters) {
			if (!error) {
				console.log(">>>> spawnDialog response: " + JSON.stringify(responseParameters));