The au-decoder-class Element"

From Documentation
m
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:
  
 
  [Default: null (using the default JSON-based format)]
 
  [Default: null (using the default JSON-based format)]
[since 5.0.4]
+
{{versionSince|5.0.4}}
  
It specifies which class used to implement the AU decoder.  The AU decoder is used to decode the AU requests. The class must implement <javadoc type="interface">org.zkoss.zk.au.AuDecoder</javadoc>.
+
It specifies which class will be used to implement the AU decoder.  The AU decoder is used to decode the AU requests. The class must implement <javadoc type="interface">org.zkoss.zk.au.AuDecoder</javadoc>.
  
 
By default, the AU request is sent in the JSON format. If you prefer to use another format, you could provide an implementation as follows.
 
By default, the AU request is sent in the JSON format. If you prefer to use another format, you could provide an implementation as follows.
  
#Implement <javadoc type="interface">org.zkoss.zk.au.AuDecoder</javadoc>
+
#Implement <javadoc type="interface">org.zkoss.zk.au.AuDecoder</javadoc>.  You can reference the default implementation, inner class AuDecoder in <code>org.zkoss.zk.au.http.DHtmlUpdateServlet</code>.
 
#Register it by specifying it with the <code>au-decoder-class</code> element in <code>WEB-INF/zk.xml</code>
 
#Register it by specifying it with the <code>au-decoder-class</code> element in <code>WEB-INF/zk.xml</code>
 
#Override a JavaScript method called <javadoc directory="jsdoc" method="encode(int, zk.Event, zk.Desktop)">_global_.zAu</javadoc>  to encode to the custom format
 
#Override a JavaScript method called <javadoc directory="jsdoc" method="encode(int, zk.Event, zk.Desktop)">_global_.zAu</javadoc>  to encode to the custom format
  
=Version History=
 
{{LastUpdated}}
 
{| border='1px' | width="100%"
 
! Version !! Date !! Content
 
|-
 
| &nbsp;
 
| &nbsp;
 
| &nbsp;
 
|}
 
  
 
{{ZKConfigurationReferencePageFooter}}
 
{{ZKConfigurationReferencePageFooter}}

Latest revision as of 03:27, 26 May 2023


The au-decoder-class Element


Syntax:

<au-decoder-class>a_class_name</au-decoder-class>
[Default: null (using the default JSON-based format)]

Since 5.0.4

It specifies which class will be used to implement the AU decoder. The AU decoder is used to decode the AU requests. The class must implement AuDecoder.

By default, the AU request is sent in the JSON format. If you prefer to use another format, you could provide an implementation as follows.

  1. Implement AuDecoder. You can reference the default implementation, inner class AuDecoder in org.zkoss.zk.au.http.DHtmlUpdateServlet.
  2. Register it by specifying it with the au-decoder-class element in WEB-INF/zk.xml
  3. Override a JavaScript method called zAu.encode(int, Event, Desktop) to encode to the custom format



Last Update : 2023/05/26

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