Revision history [back]

click to hide/show revision 1
initial version

asked 2018-06-01 22:50:27 +0800

JustinFrost gravatar image JustinFrost

Override method of zul.Upload in js

I am trying to override the error function on zul.Upload. My script is as follows:

zk.afterLoad("zul", function () {
    var _xUpload = {};
    zk.override(zul.Upload.prototype, _xUpload, {
        error : function(msg, uuid, sid) {
              // custom code here
        }
     });
});

No errors are thrown - but my custom code is never called. I am missing anything obvious here ? I have tried several ways based on documentation, but no luck.

My hope is to handle errors from uploads in a custom way, ie change the message and where they are displayed.

Thanks for any help.

Override method of zul.Upload in js

I am trying to override the error function on zul.Upload. My script is as follows:

zk.afterLoad("zul", function () {
    var _xUpload = {};
    zk.override(zul.Upload.prototype, _xUpload, {
        error : function(msg, uuid, sid) {
              // custom code here
        }
     });
});

No errors are thrown - but my custom code is never called. I am missing anything obvious here ? I have tried several ways based on documentation, but no luck.

My hope is to handle errors from uploads in a custom way, ie change the message and where they are displayed.

The above javascript is loaded globally.

Thanks for any help.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More