Class Index | File Index

Classes


Namespace mmir.DialogManager


Defined in: dialogManager.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
The DialogManager gives access to the most commonly used functions of the framework.
Method Summary
Method Attributes Method Name and Description
 
 
Get the current on-page-rendered hook function (if it was set).
 
This function closes a dialog of a controller by calling the method mmir.PresentationManager#hideCurrentDialog of the mmir.PresentationManager
 
Hides / closes the "wait" dialog.
 
perform(ctrlName, actionName, data)
This function performs an action of a controller by calling the method mmir.ControllerManager#perform of the mmir.ControllerManager
 
performHelper(ctrlName, helper_method_name, data)
This function performs an action of a helper-class for a controller by calling the method mmir.ControllerManager#performHelper of the mmir.ControllerManager
 
raise(eventName, eventData)
This function raises an event.
 
render(ctrlName, viewName, data)
This function displays a view of a controller by calling the method mmir.PresentationManager#renderView of the mmir.PresentationManager.
 
setOnPageRenderedHandler(onPageRenderedHook)
Set the on_page_loaded callback function.
 
showDialog(ctrlName, dialogId, data)
This function displays a dialog of a controller by calling the method mmir.PresentationManager#showDialog of the mmir.PresentationManager
 
showWaitDialog(text, theme)
Shows a "wait" dialog, indicating work-in-progress.
Namespace Detail
mmir.DialogManager
The DialogManager gives access to the most commonly used functions of the framework.

On initialization, the DialogManager also creates the mmir.DialogEngine and returns it as the second argument of the #init() function's callback (or the Promise's triggered callbacks). In addition, the DialogEngine is exported as module "dialogEngine" via RequireJS' define() function.

//initialization of inputManager
require('dialogManager').init().then( function(dialogManagerInstance, dialogEngineInstance){
		//do something
});
Requires:
mmir.ControllerManager
mmir.PresentationManager
mmir.ModelManager
jQuery.Deferred
jQuery.extend
Method Detail
getInstance()
Deprecated:
instead: use mmir.DialogManager object directly.

getOnPageRenderedHandler(the)
Get the current on-page-rendered hook function (if it was set).
Parameters:
{Function} the
onPageRendered handler (NOTE: this may not be set, i.e. undefined)

hideCurrentDialog()
This function closes a dialog of a controller by calling the method mmir.PresentationManager#hideCurrentDialog of the mmir.PresentationManager

hideWaitDialog()
Hides / closes the "wait" dialog. This is a shortcut for calling mmir.PresentationManager#hideWaitDialog (see documentation in PresentationManager for parameters).
See:
mmir.PresentationManager#hideWaitDialog
mmir.PresentationManager#showWaitDialog

{Object} perform(ctrlName, actionName, data)
This function performs an action of a controller by calling the method mmir.ControllerManager#perform of the mmir.ControllerManager
Parameters:
{String} ctrlName
Name of the controller to which the action belongs
{String} actionName
Name of the action that should be performed
{Object} data
optional data that can be submitted to the action
Returns:
{Object} the return object of the performed action

{Object} performHelper(ctrlName, helper_method_name, data)
This function performs an action of a helper-class for a controller by calling the method mmir.ControllerManager#performHelper of the mmir.ControllerManager
Parameters:
{String} ctrlName
Name of the controller to which the helper action belongs
{String} helper_method_name
Name of the action that should be performed by the helper
{Object} data
optional data that can be submitted to the action
Returns:
{Object} the return object of the performed action

raise(eventName, eventData)
This function raises an event.
Parameters:
{String} eventName
The name of the event which is to be raised
{Object} eventData Optional
OPTIONAL Data belonging to the event
Throws:
{Error}
if this function is invoked while the internal event/state engine (i.e. mmir.DialogEngine is not initialized yet

render(ctrlName, viewName, data)
This function displays a view of a controller by calling the method mmir.PresentationManager#renderView of the mmir.PresentationManager.
And after rendering, the function set via #setOnPageRenderedHandler will called in context of the controller instance with arguments: Controller.onPageRenderedFunc(ctrlName, viewName, data)
Parameters:
{String} ctrlName
Name of the controller to which the view belongs
{String} viewName
Name of the view that should be rendered
{Object} data
Optional data that can be submitted to the generation of the view

setOnPageRenderedHandler(onPageRenderedHook)
Set the on_page_loaded callback function. If onPageRenderedHook is a function object, it will be executed after a view is rendered and after the view's controller on_page_load function(s) has/have been executed.

This function will be executed after the view's on_page_load()-function.
The onPageRenderedHook function takes 3 arguments that refer to the parameters with which the render-function was invoked:
{String} ctrlName Name of the controller to which the view belongs
{String} viewName Name of the view that should be rendered
{Object} [data] Optional data that can be submitted to the generation of the view

Parameters:
{Function} onPageRenderedHook
a callback function that will be executed after a view was rendered i.e. after a page was loaded.

showDialog(ctrlName, dialogId, data)
This function displays a dialog of a controller by calling the method mmir.PresentationManager#showDialog of the mmir.PresentationManager
Parameters:
{String} ctrlName
Name of the controller to which the dialog belongs
{String} dialogId
Id of the dialog that should be displayed
{Object} data
Optional data that can be submitted to the dialog

showWaitDialog(text, theme)
Shows a "wait" dialog, indicating work-in-progress. This is a shortcut for calling mmir.PresentationManager#showWaitDialog (see documentation in PresentationManager for parameters).
Parameters:
text
theme
See:
mmir.PresentationManager#showWaitDialog
mmir.PresentationManager#hideWaitDialog

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 26 2016 21:33:47 GMT+0100 (Mitteleuropäische Zeit)