Widget context objects
For the Dynamic Widget widget type, the event code attributes are barely used. Very limited context objects are available here.
OnOpen
, OnClose
, OnManeuver
and OnChange
attributes are barely used.
Widgets rely solely on the Click Action
attribute, and connected View File
/View URL
attributes (if present).
Dynamic Widget List Items event context
The only available method in widget list views is
whereurl
is the same pattern allowed in OpenLink section.
Only Text
, Numeric
, Static
and Symbol
elements are allowed in List view lists.
Animation view context objects
In animation views, a very complex and complete context is available in the event code attributes. In runtime, all symbols and views in view containers are exposed with their names. Consider the following view structure:
View1
Arguments
Elements
Button1
Numeric2
Text2
ViewContainer1 - with configuration to sub view.
In runtime, when the View Container loads its view, the resulting object hierarchy looks like
graph TD
Session-->View1
View1-->Button1
View1-->Numeric2
View1-->Text2
View1-->ViewContainer1
ViewContainer1-->View
View-->Button1
View-->Button2
View-->Symbol1
this.view
The this.view
points always to the nearest View object available.
Example
this.parent
Always the nearest parent. For Symbol1:
this.parent
refers to the View inside ViewContainer1.
this.parent.parent
refers to ViewContainer1.
this.parent.parent.parent
refers to View1.
this.session
Always the top most session object.
Tip
To investigate the context and arguments to the OnOpen
, OnClose
, OnManeuver
or OnChanged
event code, simply put a debugger;
statement in the event code.
Press ++F12++ or open DevTools from the browser menu and refresh the page, then use the right panel to explore the context.
Tip
If you expand the Prototype
of the object in DevTools, the available methods for the selected object are displayed.