Notifications"

From Documentation
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{ZKClient-sideReferencePageHeader}}
 
{{ZKClient-sideReferencePageHeader}}
  
In this section we discuss the notifications at the client side.
+
In this section, we discuss the notifications on the client side.
  
There are three ways to notify: widget events (<javadoc directory="jsdoc">zk.Event</javadoc>), DOM events (<javadoc directory="jsdoc">jq.Event</javadoc>) and client activity watches.
+
There are 3 ways to notify:  
 +
# widget events (<javadoc directory="jsdoc">zk.Event</javadoc>)
 +
#: A widget event is a widget-level event. It is used either to encapsulate a DOM event, or to represent a notification specific to a widget, or to an application.
 +
# DOM events (<javadoc directory="jsdoc">jq.Event</javadoc>)
 +
#: A DOM event (Event) is the DOM-level (i.e., low-level) event that is usually triggered by the browser. It is usually listened by a widget itself, rather than the client application.
 +
# client activity watches
 +
#: A client activity watch is a notification for special activities that are not available as DOM events or widget events, for example, the notification when a widget is becoming invisible.
  
A DOM event (Event) is the DOM-level (i.e., low-level) event that is usually triggered by the browser. It is usually listened by the implementation of a widget, rather than the client application.  
+
It is generally suggested to listen to widget events (rather than DOM events) if possible since it is easier and more efficient.
  
A widget event is the high-level event. It is used either to encapsulate a DOM event, or to represent a notification specific to a widget, or to an application.
+
They are mainly used for component development. Application developers '''rarely need''' it. For a complete reference, please refer to [http://zkoss.org/javadoc/latest/jsdoc/ JavaScript APIs].
 
 
It is generally suggested to listen widget events (rather than DOM events) if possible, since it is easier and more efficient.
 
 
 
A client activity watch is a notification for special activities that are not available as DOM events or widget events. For example, the notification when a widget is becoming invisible.
 
 
 
They are mainly used for component development. Application developers ''rarely need'' it. For a complete reference, please refer to [http://zkoss.org/javadoc/latest/jsdoc/ JavaScript APIs].
 
  
 
{{ZKClient-sideReferenceHeadingToc}}
 
{{ZKClient-sideReferenceHeadingToc}}
 
{{ZKClient-sideReferencePageFooter}}
 
{{ZKClient-sideReferencePageFooter}}

Latest revision as of 07:11, 14 July 2023


Notifications



In this section, we discuss the notifications on the client side.

There are 3 ways to notify:

  1. widget events (Event)
    A widget event is a widget-level event. It is used either to encapsulate a DOM event, or to represent a notification specific to a widget, or to an application.
  2. DOM events (Event)
    A DOM event (Event) is the DOM-level (i.e., low-level) event that is usually triggered by the browser. It is usually listened by a widget itself, rather than the client application.
  3. client activity watches
    A client activity watch is a notification for special activities that are not available as DOM events or widget events, for example, the notification when a widget is becoming invisible.

It is generally suggested to listen to widget events (rather than DOM events) if possible since it is easier and more efficient.

They are mainly used for component development. Application developers rarely need it. For a complete reference, please refer to JavaScript APIs.




Last Update : 2023/07/14

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.