new mmir.compat.v4.DialogManager()
        Backwards compatibility for DialogManager (<= version 4.x):
(re-)adds the following methods/functionality to the DialogManager instance:
 * perform(ctrlName, actionName, data)
 * performHelper(ctrlName, helperActionName, data)
 * showDialog(ctrlName, dialogId, data)
 * hideCurrentDialog()
 * showWaitDialog(text, theme)
 * hideWaitDialog()
 * render(ctrlName, viewName, data)
 * getOnPageRenderedHandler()
 * setOnPageRenderedHandler(handlerFunction)
 * _setControllerManager(controllerManager)
 * _setPresentationManager(presentationManager)
    
    
    
    
    
    
    
    
    
Example
//extend DialogManager with helper/shortcut functions (e.g for <= v4.x backwards compatibility):
var dialogManager = require('mmirf/dialogManager');
//or: var dialogManager = mmir.dialog;
require('mmirf/dialogManager4Compatibility')(dialogManager);
dialogManager.render('Application', 'welcome').then(function(){ console.log('rendered welcome view') })Requires
- module:mmir.ControllerManager
- module:mmir.PresentationManager
Members
- 
    privateonPageRenderedFuncfunction
Methods
- 
    _setControllerManager()
- 
    
    
    
    
    
    
    
    
    
- 
    _setPresentationManager()
- 
    
    
    
    
    
    
    
    
    
- 
    getOnPageRenderedHandler(the)
- 
    
    
    Get the current on-page-rendered hook function (if it was set).Name Type Description thefunction onPageRendered handler (NOTE: this may not be set, i.e. undefined) 
- 
    hideCurrentDialog()
- 
    
    
    This function closes a dialog of a controller by calling the methodmmir.PresentationManager#hideCurrentDialogof themmir.PresentationManager
- 
    hideWaitDialog()
- 
    
    
    Hides / closes the "wait" dialog. This is a shortcut for callingmmir.PresentationManager#hideWaitDialog(see documentation inPresentationManagerfor parameters).
- 
    perform(ctrlName, actionName, data){Object}
- 
    
    
    This function performs an action of a controller by calling the methodmmir.ControllerManager#performof themmir.ControllerManagerName Type Description ctrlNameString Name of the controller to which the action belongs actionNameString Name of the action that should be performed dataObject optional data that can be submitted to the action Returns:Type Description Object the return object of the performed action 
- 
    performHelper(ctrlName, helper_method_name, data){Object}
- 
    
    
    This function performs an action of a helper-class for a controller by calling the methodmmir.ControllerManager#performHelperof themmir.ControllerManagerName Type Description ctrlNameString Name of the controller to which the helper action belongs helper_method_nameString Name of the action that should be performed by the helper dataObject optional data that can be submitted to the action Returns:Type Description Object the return object of the performed action 
- 
    render(ctrlName, viewName, data){void|Promise}
- 
    
    
    This function displays a view of a controller by calling the methodmmir.PresentationManager#renderViewof themmir.PresentationManager.
 And after rendering, the function set via #setOnPageRenderedHandler will called in context of the controller instance with arguments:Controller.onPageRenderedFunc(ctrlName, viewName, data)Name Type Description ctrlNameString Name of the controller to which the view belongs viewNameString Name of the view that should be rendered dataObject Optional data that can be submitted to the generation of the view Returns:Type Description void | Promise if void/undefined is returned, the view is rendered synchronously, i.e. the view is rendered, when this method returns. If a Promise is returned, the view is rendered asynchronously (rendering is finished, when the promise is resolved) 
- 
    setOnPageRenderedHandler(onPageRenderedHook)
- 
    
    
    Set the on_page_loaded callback function. IfonPageRenderedHookis 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. 
 TheonPageRenderedHookfunction takes 3 arguments that refer to the parameters with which the render-function was invoked:
 {String} ctrlNameName of the controller to which the view belongs
 {String} viewNameName of the view that should be rendered
 {Object} [data]Optional data that can be submitted to the generation of the viewName Type Description onPageRenderedHookfunction 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 methodmmir.PresentationManager#showDialogof themmir.PresentationManagerName Type Description ctrlNameString Name of the controller to which the dialog belongs dialogIdString Id of the dialog that should be displayed dataObject Optional data that can be submitted to the dialog 
- 
    showWaitDialog()
- 
    
    
    Shows a "wait" dialog, indicating work-in-progress. This is a shortcut for callingmmir.PresentationManager#showWaitDialog(see documentation inPresentationManagerfor parameters).