AU Responses"

From Documentation
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
An AU response is the command sent from the server to the client for synchronizing back the server's states and performing some functionality. In response to the [[ZK Client-side Reference/Communication/AU Requests|AU request]] sent by the client, the server could send one or multiple AU responses to the client. Each AU response consists of a command and a sequence of data. The command is a string, and the data could be any objects (as long as [http://www.json.org/ JSON] can handle it).
 
An AU response is the command sent from the server to the client for synchronizing back the server's states and performing some functionality. In response to the [[ZK Client-side Reference/Communication/AU Requests|AU request]] sent by the client, the server could send one or multiple AU responses to the client. Each AU response consists of a command and a sequence of data. The command is a string, and the data could be any objects (as long as [http://www.json.org/ JSON] can handle it).
  
There are two groups of commands depending on whether the command is applied to a particular widget (<javadoc directory="jsdoc">zk.Widget</javadoc>), or to the whole browser. For sake of description, we call the first kind of commands as the widget commands, while the second kind the global commands.
+
There are two groups of commands depending on whether the command is applied to a particular widget (<javadoc directory="jsdoc">zk.Widget</javadoc>), or to the whole browser. For the sake of description, we call the first kind of commands as the widget commands, while the second kind the global commands.
  
 
{| border='1px' | width="100%"
 
{| border='1px' | width="100%"
Line 10: Line 10:
 
| <javadoc directory="jsdoc">zk.AuCmd0</javadoc>
 
| <javadoc directory="jsdoc">zk.AuCmd0</javadoc>
 
| <javadoc directory="jsdoc" method="cmd0">_global_.zAu</javadoc>
 
| <javadoc directory="jsdoc" method="cmd0">_global_.zAu</javadoc>
| <javadoc directory="jsdoc">zk.AuCmd0</javadoc> is the class to handle all global commands (i.e., applied to the whole browser).
+
| <javadoc directory="jsdoc">zk.AuCmd0</javadoc> is the class to handle all '''global''' commands (i.e., applied to the whole browser).
 
Furthermore, all global commands are handled by an instance of <javadoc directory="jsdoc">zk.AuCmd0</javadoc> called <javadoc directory="jsdoc" method="cmd0">_global_.zAu</javadoc>.
 
Furthermore, all global commands are handled by an instance of <javadoc directory="jsdoc">zk.AuCmd0</javadoc> called <javadoc directory="jsdoc" method="cmd0">_global_.zAu</javadoc>.
 
|-
 
|-
 
| <javadoc directory="jsdoc">zk.AuCmd1</javadoc>
 
| <javadoc directory="jsdoc">zk.AuCmd1</javadoc>
 
| <javadoc directory="jsdoc" method="cmd1">_global_.zAu</javadoc>
 
| <javadoc directory="jsdoc" method="cmd1">_global_.zAu</javadoc>
| <javadoc directory="jsdoc">zk.AuCmd1</javadoc> is the class to handle all widget commands (i.e., applied to a particular widget).
+
| <javadoc directory="jsdoc">zk.AuCmd1</javadoc> is the class to handle all '''widget''' commands (i.e., applied to a particular widget).
Furthermore, all global commands are handled by an instance of <javadoc directory="jsdoc">zk.AuCmd1</javadoc> called <javadoc directory="jsdoc" method="cmd1">_global_.zAu</javadoc>.
+
Furthermore, all widget commands are handled by an instance of <javadoc directory="jsdoc">zk.AuCmd1</javadoc> called <javadoc directory="jsdoc" method="cmd1">_global_.zAu</javadoc>.
 
|}
 
|}
  

Latest revision as of 02:57, 25 September 2019


An AU response is the command sent from the server to the client for synchronizing back the server's states and performing some functionality. In response to the AU request sent by the client, the server could send one or multiple AU responses to the client. Each AU response consists of a command and a sequence of data. The command is a string, and the data could be any objects (as long as JSON can handle it).

There are two groups of commands depending on whether the command is applied to a particular widget (Widget), or to the whole browser. For the sake of description, we call the first kind of commands as the widget commands, while the second kind the global commands.

Class Object Description
AuCmd0 zAu.cmd0 AuCmd0 is the class to handle all global commands (i.e., applied to the whole browser).

Furthermore, all global commands are handled by an instance of AuCmd0 called zAu.cmd0.

AuCmd1 zAu.cmd1 AuCmd1 is the class to handle all widget commands (i.e., applied to a particular widget).

Furthermore, all widget commands are handled by an instance of AuCmd1 called zAu.cmd1.

Add a New Command

If you'd like to add a new command, you could simply add a new property to to zAu.cmd0 or zAu.cmd1, depending on your requirement. For example,

zk.zAu.cmd0.bookmark = function (bk, replace) {
    //...
};

Version History

Last Update : 2019/09/25


Version Date Content
     



Last Update : 2019/09/25

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