webMethods Business Console Documentation 10.5 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Programming Gadgets | Loading a Gadget or an AppSpace in a Modal Dialog Box | Loading an AppSpace in a Modal Dialog Box
 
Loading an AppSpace in a Modal Dialog Box
1. Inject AppspaceUtilityService into the controller or service.
2. Use the service to load the gadget.
You can use the following code:

appspaceUtilityService

.newAppspaceModal() //to ensure a new modal instance
//is opened by closing any exisiting one
.showHeader(false) //true or false depending on whether
//you want to show the header
.showRefreshIcons(true)//true or false depending on whether
//you want to show the refresh icon
.setRefreshEvent("<REFRESH_EVENT_NAME>") //Event to fire when
//the refresh icon is clicked
.params(params)//Optional. If you want to pass parameters to
//the gadget, you can do so as shown below
.scope(this.$scope) //To pass the scope
.appspaceAlias("<APPSPACE_ALIAS>") // The alias of the appspace to launch
.launchAppspace();

If you want to pass parameters, create a variable as shown below before
calling the launchGadget method.
var params = {"KEY1":"VALUE1","KEY2":"VALUE2"};

Copyright © 2014-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.