Handle AU Request Resend"

From Documentation
(Created page with "{{ZKDevelopersReferencePageHeader}} When an AU request failing, the default ''Client Engine'' implemetation will retry 3 times to resend it and ask for a confirming dialog to us...")
 
m
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{ZKDevelopersReferencePageHeader}}
 
{{ZKDevelopersReferencePageHeader}}
  
When an AU request failing, the default ''Client Engine'' implemetation will retry 3 times to resend it and ask for a confirming dialog to user.
+
When an AU request fails, the default ''Client Engine'' implementation will retry 3 times to resend it and ask for a confirming dialog to user.
  
Since ZK 6.5.2 release, we provide a way to developer to customize the error handling.
+
 
 +
{{versionSince | 6.5.2}}
 +
 
 +
We provide a way for developer to customize the error handling.
  
 
For example,
 
For example,
Line 25: Line 28:
  
 
=Version History=
 
=Version History=
{{LastUpdated}}
+
 
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-

Latest revision as of 09:36, 2 February 2024


Handle AU Request Resend


When an AU request fails, the default Client Engine implementation will retry 3 times to resend it and ask for a confirming dialog to user.


Since 6.5.2

We provide a way for developer to customize the error handling.

For example,

zAu.ajaxErrorHandler = function (req, status, statusText, ajaxReqTries) {
    if (ajaxReqTries == null)
        ajaxReqTries = 3; // retry 3 times
        
    // reset the resendTimeout, for more detail, please refer to 
    // http://books.zkoss.org/wiki/ZK_Configuration_Reference/zk.xml/The_client-config_Element/The_auto-resend-timeout_Element 
    zk.resendTimeout = 2000;//wait 2 seconds to resend.
    
    if (!zAu.confirmRetry("FAILED_TO_RESPONSE", status+(statusText?": "+statusText:"")))
        return 0; // no retry;
    return ajaxReqTries;
}

For more detail on the arguments, please take a look at zAu.ajaxErrorHandler(Object, int, String, int)

Version History

Version Date Content
6.5.2 February, 2013 AU response error can be handle by user



Last Update : 2024/02/02

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