Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Canvas Launch API enables you to launch or open other apps (widgets) from the current app. Using this API you can launch the following:

This is a core API that can be invoked in any event. The usage of canvas.launch() API is explained here with the following task as an example:

Anchor
launch_another_workspace
launch_another_workspace
Launch (open) another workspace

...

  1. Anchor
    launch_another_workspace
    launch_another_workspace
    Launch another workspace

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	workspaceId : '<WORKSPACE_ID>', 
    	callback : <function(){}> (Optional) 
    });

    Example

    Code Block
    languagetext
    canvas.launch(
    {
    	workspaceId : 'ACC_SERV_WSPACE'
    });


  2. Anchor
    launch_workspace_layout
    launch_workspace_layout
    Launch a workspace and layout

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	workspaceId : '<WORKSPACE_ID>',
    	layoutId : '<LAYOUT_ID>', 
    	callback : <function(){}> (Optional) 
    }); 

    Example

    Code Block
    languagetext
    canvas.launch(
    {
    	workspaceId : 'CHART_WS', 
    	layoutId : 'CHART_LYT'
    });


  3. Anchor
    launch_workspace_layout_widget
    launch_workspace_layout_widget
    Launch a workspace, layout, then a widget

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	workspaceId : '<WORKSPACE_ID>', 
    	layoutId : '<LAYOUT_ID>', 
    	widgetId : '<WIDGET_ID>', 
    	callback : <function(){}> (Optional) 
    }); 
    

    Example

    Code Block
    languagetext
    canvas.launch(
    {
    	workspaceId : 'LOANS_WS', 
    	layoutId : 'LOANS_LYT', 
    	widgetId : 'CT_LOAN_SUMMARY_WGT'
    });


  4. Anchor
    launch_ws_layout_widget_appshortcut
    launch_ws_layout_widget_appshortcut
    Launch a workspace, layout, widget, and trigger a non-contextual app handler

    Consider a scenario where you need to launch a non-contextual app (e.g. app shortcut) on an empty widget. The app shortcut when clicked will take the user to the linked app (widget). To achieve this via canvas.launch() API, you can use the customLauncher parameter, which is the handler for app shortcut item.

    Note

    This variant of canvas.launch() API is enabled in TBS only. 

    Syntax

    Code Block
    languagejs
    canvas.launch(
    {
        workspaceId : '<WORKSPACE_ID>',
        layoutId : '<LAYOUT_ID>',
        widgetId : '<WIDGET_ID>',
        customLauncher : <function(){}> (app shortcut handler; Optional)
    });

    Example

    Code Block
    languagejs
    ACHR.registerHandler(<APP_SHORTCUT_ID>, function (config)
    {
    	// implementation code
    });
    
    var config = {};
    config.workspaceId = workspaceId;
    config.layoutId = LayoutId;
    config.widgetId = WidgetId;
    var appId = <APP_SHORTCUT_ID>;
    if (appId != null && appId != undefined)
    {
    	config.customLauncher = ACHR.getHandler(appId);
    }
    canvas.launch(config);


  5. Anchor
    launch_widget_modal_window
    launch_widget_modal_window
    Launch a widget in modal window

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	renderType : 'WINDOW',
    	widgetId : '<WIDGET_ID>',
    	width : '<WIDTH_IN_%_OR_PXL>', (Optional) 
    	height : '<HEIGHT_IN_%_OR_PXL>', (Optional) 
    	fullScreenInd : <TRUE | FALSE>, (Optional) 
    	closeOnEsc : <TRUE | FALSE>, (Optional) 
    	modalDialog : <TRUE | FALSE>, (Optional) 
    	draggable : <TRUE | FALSE>,	(Optional) 
    	callback : <function(){}> (Optional) 
    }); 

    Example

    Code Block
    languagetext
    canvas.launch(
    {
    	renderType : 'WINDOW', 
    	widgetId : 'CT_LOAN_SUMMARY_WGT'
    });


  6. Anchor
    launch_form_modal_window
    launch_form_modal_window
    Launch a form with container in Modal window

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	renderType : 'WINDOW',
    	formId : '<FORM_ID>', 
    	containerId : '<CONTAINER_ID>', 
    	width : '<WIDTH_IN_%_OR_PXL>', (Optional) 
    	height : '<HEIGHT_IN_%_OR_PXL>', (Optional) 
    	fullScreenInd : <TRUE | FALSE>, (Optional) 
    	closeOnEsc : <TRUE | FALSE>, (Optional) 
    	modalDialog : <TRUE | FALSE>, (Optional) 
    	draggable : <TRUE | FALSE>,	(Optional) 
    	callback : <function(){}> (Optional) 
    }); 

    Example

    Code Block
    languagetext
    canvas.launch(
    {
    	renderType : 'WINDOW',
    	formId : 'CT_PAYMENT_FORM',
    	containerId : 'PAYMENTS_FORM_CONTAINER'
    });


  7. Anchor
    launch_from_without_modal_window
    launch_from_without_modal_window
    Launch a form without container in Modal window
    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	renderType : 'WINDOW',
    	formId : '<FORM_ID>', 
    	width : '<WIDTH_IN_%_OR_PXL>', (Optional) 
    	height : '<HEIGHT_IN_%_OR_PXL>', (Optional) 
    	fullScreenInd : <TRUE | FALSE>, (Optional) 
    	closeOnEsc : <TRUE | FALSE>, (Optional) 
    	modalDialog : <TRUE | FALSE>, (Optional) 
    	draggable : <TRUE | FALSE>,	(Optional) 
    	callback : <function(){}> (Optional) 
    });

    Example

    Code Block
    languagetext
    canvas.launch(
    {
    	renderType : 'WINDOW',
    	formId : 'CT_PAYMENT_FORM'
    });


  8. Anchor
    form_rendered_app
    form_rendered_app
    Form rendered in an app with container

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	formId : '<FORM_ID>', 
    	containerId : '<CONTAINER_ID>', 
    	RenderTyperenderType : 'APP',
    	workspaceId : '<WORKSPACE_ID>', 
    	layoutId : '<LAYOUT_ID>', 
    	widgetId : '<WIDGET_ID>',
    	width : '<WIDTH_IN_%_OR_PXL>', (Optional) 
    	height : '<HEIGHT_IN_%_OR_PXL>', (Optional) 
    	fullScreenInd : <TRUE | FALSE>, (Optional) 
    	closeOnEsc : <TRUE | FALSE>, (Optional) 
    	modalDialog : <TRUE | FALSE>, (Optional) 
    	draggable : <TRUE | FALSE>,	(Optional) 
    	callback : <function(){}> (Optional) 
    });

    Example

    Code Block
    languagetext
    canvas.launch(
    {
    	formId : 'CT_PAYMENT_FORM',
    	containerId : 'PAYMENTS_FORM_CONTAINER', 
    	renderType : 'APP', 
    	workspaceId : 'ACC_SERV_WSPACE', 
    	layoutId : 'ACC_SERV_LYT', 
    	widgetId : 'EMPTYAPP'
    });


  9. Anchor
    from_rendered_with_object_container
    from_rendered_with_object_container
    Form renders with form object and container in Modal Window:

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	fm : '<fm_Obj>',
    	containerId : '<CONTAINER_ID>', 
    	width : '<WIDTH_IN_%_OR_PXL>', (Optional) 
    	height : '<HEIGHT_IN_%_OR_PXL>', (Optional) 
    	fullScreenInd : <TRUE | FALSE>, (Optional) 
    	closeOnEsc : <TRUE | FALSE>, (Optional) 
    	modalDialog : <TRUE | FALSE>, (Optional) 
    	draggable : <TRUE | FALSE>, (Optional) 
    	callback : <function(){}> (Optional) 
    }); 
    

    Example

    Code Block
    languagetext
    var frmMgr = new canvas.form.FormManager(
    {
    	formId : 'CT_PAYMENT_FORM'
    });
    
    canvas.launch(
    {
    	fm : frmMgr, 
    	containerId : 'PAYMENTS_FORM_CONTAINER'
    });


  10. Anchor
    from_without_container
    from_without_container
    Form renders with form object and without container in Modal Window:

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	fm : '<fm_Obj>', 
    	width : '<WIDTH_IN_%_OR_PXL>', (Optional) 
    	height : '<HEIGHT_IN_%_OR_PXL>', (Optional) 
    	fullScreenInd : <TRUE | FALSE>, (Optional) 
    	closeOnEsc : <TRUE | FALSE>, (Optional) 
    	modalDialog : <TRUE | FALSE>, (Optional) 
    	draggable : <TRUE | FALSE>, (Optional) 
    	callback : <function(){}> (Optional) 
    });

     Example

    Code Block
    languagetext
    var frmMgr = new canvas.form.FormManager(
    {	
    	formId : 'CT_PAYMENT_FORM'
    });
    
    canvas.launch(
    {
    	fm : frmMgr
    });


  11. Anchor
    html_content
    html_content
    Launch a custom HTML Content in Modal Window

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	modalContent : '<HTML_DOM>', 
    	title : '<TITLE_OF_WINDOW>', (Optional) 
    	width : '<WIDTH_IN_%_OR_PXL>', (Optional) 
    	height : '<HEIGHT_IN_%_OR_PXL>', (Optional) 
    	fullScreenInd : <TRUE | FALSE>, (Optional) 
    	closeOnEsc : <TRUE | FALSE>, (Optional) 
    	modalDialog : <TRUE | FALSE>, (Optional) 
    	draggable : <TRUE | FALSE>,	(Optional) 
    	callback : <function(){}> (Optional) 
    });

    Example

    Code Block
    languagetext
    canvas.launch(
    { 
    	modalContent : 'Hello'
    });


  12. Anchor
    predefined_dialog
    predefined_dialog
    Launch pre-defined dialog messages in the modal window

    Syntax

    Code Block
    languagetext
    canvas.launch(
    { 
    	message : '<MESSAGE_OF_DIALOG>', 
    	dialogType : 'CONFIRMATION'|'MESSAGE'|'WARN_EDIT_OK'|'SUCCESS'|'ERROR'|'WARNING' 
    	width : '<WIDTH_IN_%_OR_PXL>', (Optional) 
    	height : '<HEIGHT_IN_%_OR_PXL>', (Optional) 
    	fullScreenInd : <TRUE | FALSE>, (Optional) 
    	closeOnEsc : <TRUE | FALSE>, (Optional) 
    	modalDialog : <TRUE | FALSE>, (Optional) 
    	draggable : <TRUE | FALSE>,	(Optional) 
    	callback : <function(){}> (Optional) 
    });

    Example

    Code Block
    languagetext
    canvas.launch(
    {
    	message : 'The mandatory fields are not filled-in', 
    	dialogType : 'ERROR'
    });