Communication to app container

The widget is a Dojo Dijit widget; therefore, when a widget instantiates, it goes through the full life cycle of a Dijit widget, such as constructor, postCreate, and startup. For more information, see http://dojotoolkit.org/documentation/tutorials/1.9/understanding_widgetbase/.

In addition to the Dojo Dijit life cycle functions, the widget has other callback functions that you can use:

AttributeDescription

onOpen

Called each time the widget opens. When a widget instantiates, this method is called after startup.

onMaximize

Called when the widget is maximized. This method may never be called in some panels that do not have a maximize/minimize state.

onMinimize

Called when the widget is minimized. This method may never be called in some panels that do not have a maximize/minimize state.

onClose

Called when the widget closes.

onSignIn

Called when a user signs in to the portal or ArcGIS Online.

onSignOut

Called when a user signs out from the portal or ArcGIS Online.

onPositionChange

Called when the widget's position (left, right, top, bottom, width, height) changes. The widget's position may be changed when the user changes the layout in the builder.

resize

Called when the window resizes.

onNormalize

Called when the widget is normalized.

onActive

Called when the widget is active. A widget is active when users click it.

onDeActive

Called when the widget is not active. Other widgets are not active when users click a widget.

setPosition

Called before the on-screen widget opens. By default, the widget is placed at the configured position, which can be overridden.

getPanel

Returns the widgets' panel. For an off-panel widget, it is null.