Namespace mmir.DialogManager
Defined in: dialogManager.js.
Constructor Attributes | Constructor Name and Description |
---|---|
The DialogManager gives access to the most commonly used functions of
the framework.
|
Field Attributes | Field Name and Description |
---|---|
<private> | |
<private> |
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.
|
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
- See:
- Deprecated:
- instead: use mmir.DialogManager object directly.
- Parameters:
- {Function} the
- onPageRendered handler (NOTE: this may not be set, i.e. undefined)
PresentationManager
for parameters).
- 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
- 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
- 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
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
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.
- 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
PresentationManager
for parameters).
- Parameters:
- text
- theme