Web AppBuilder

1679
4
Jump to solution
02-04-2016 11:33 AM
Labels (1)
CenterlineMapping
New Contributor III

Hello,

How is it possible to call a function when closing a widget in Web AppBuilder?  For example, when the user closes a custom widget, remove the tables from the widget so the next time the user opens the widget, the tables are cleared and removed.  Another example, when the user clicks "Ok" in the Splash widget, programmatically open the Layer List widget to display the layers of the web map.  The documentation online does not seem to work, nor does the onDestroy method within each widget.  Please let me know the appropriate way to complete this.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Centerline,

   Each widget has an onClose event that you can use.

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Emeritus

Centerline,

   Each widget has an onClose event that you can use.

CenterlineMapping
New Contributor III

Robert,

Thanks for the quick solution.

Do you know if there is a method for programmatically opening a widget similar to the closePanel method:

PanelManager.getInstance().closePanel(widgetid + ‘_panel’);

This will be used to programmatically open the Layerlist widget once the user clicks "Ok" in the Splash widget.

Thanks for your help!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Centerline,

   Sure there are several post about it it's just openPanel instead.

CenterlineMapping
New Contributor III

var pm = PanelManager.getInstance(); 

        pm.showPanel(this.appConfig.widgetPool.widgets[0]); 

Solution found!

0 Kudos