0

ZK Ajax request

asked 2012-11-05 11:19:23 +0800

Lesstra gravatar image Lesstra
193 1

updated 2012-11-05 11:20:09 +0800

Hi,

I've been looking at the client side reference and the documentation, but couldn't quite figure out and pinpoint where exactly and how ZK sends AJAX request to the server. Does anyone know how is this achieved?
I was debugging a little zk.wpd Javascript source, but couldn't locate the AJAX code. Does ZK use jQuery, or does it have its own custom AJAX module?

Thanks.

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2012-11-05 11:34:51 +0800

gekkio gravatar image gekkio flag of Finland
899 1
http://gekkio.fi/blog

You can find all the client-side AJAX stuff in au.js (I'm pretty sure "au" means "Ajax Update"). ZK doesn't use JQuery-provided AJAX for normal requests, but accesses the XHR object directly.

link publish delete flag offensive edit

answered 2012-11-05 12:15:02 +0800

Lesstra gravatar image Lesstra
193 1

Thanks gekkio,
and yes, "AU" is probably AJAX update... but where is that au.js file located? When I turn on Chrome's dev.tools, the only thing I see loaded are files starting with "z" (like zul.tab.wpd, aul.box.wpd, zk.wpd, etc). I found out that zk.wpd contains some widgets definitions (like Button) and I managed to locate 'onClick' event handler, but didn't get much form there, in the terms of locating the AJAX request... but thanks anyway

link publish delete flag offensive edit

answered 2012-11-05 14:19:49 +0800

gekkio gravatar image gekkio flag of Finland
899 1
http://gekkio.fi/blog

ZK concatenates at runtime most individual JS files into packages (the WPD files), so at runtime the code probably resides in zk.wpd. The original au.js file can be found in ZK source code.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-11-05 11:19:23 +0800

Seen: 119 times

Last updated: Nov 05 '12

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