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 context, 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 128

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 142

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 });

(launchParams, inputParams, dialogResponseCallback, cb)
clients/dialogManagerClient.js, line 79

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
launchParams object

Parameters. Same as LauncherClient#spawn with the following exceptions.

Name Type Description
url string

URL of dialog to launch

name string optional

The name of the dialog

x any

Same as LauncherClient#spawn except defaults to "center".

y any

Same as LauncherClient#spawn except defaults to "center".

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.

cb function optional

Returns response from LauncherClient#spawn

		name: "dialogTemplate",
		someData: 12345
		function (error, responseParameters) {
			if (!error) {
				console.log(">>>> spawnDialog response: " + JSON.stringify(responseParameters));