For scripts embedded in a ZUML page, there are a set of implicit objects that enable developers to access components more efficiently. It's also a mechanism to pass data inter page, application. These objects are available to the Java codes included by the
zscript element and the attributes for specifying event listeners. They are also available to EL expressions.
self is an instance of Component to represent the component being processing. In the following example, you could identify the component in an event listener by
<button label="Try" onClick="alert(self.label)"/>
event is the current event being processed by an event listener. Thus, the above statement is equivalent to
<button label="Try" onClick="alert(event.target.label)"/>