-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
i am trying to integrate a GWT widget in a zk 5.0.4 application. My approach is quite similar to the ext grid sample and works for zk 3.6.3. The tricky part is to set up two-way communication between GWT and zk. I managed to call the GWT widget initialization in the init() function of my zk cllient component (MyButton.js):
zkMyButton.init = function(cmp) {
gwtMyButton.init(cmp, cmp.id);
};
gwtMyButton.init() is a global function initialized by loading the GWT compiled module in the xul file:
<window>
<script src="/mybutton/mybutton.nocache.js" type="text/javascript" />
<mybutton id="m" />
</window>
I am trying to port this to zk 5.0.4 but i can't seem to load the GWT compiled module file before zk draws the widget.
The zul file is the same as above, but the widget's redraw method gets called before the script is loaded.
Do i have to load my script in some other place (iwas thinking of the wpd file but that only seems to load from the classpath) ?
Thx,
Jan
in ZK 5, the life cycle mechanism of component us different from ZK 3.
and you can load the specific wpd file by your self.
Thanks for the hint, but i just figured out the problem lies with GWT, not ZK.
Apparently GWT loads its module in a separate iframe which is not loaded sequentially with the rest of the page.
I just managed to solve it by creating a global function in zk and have that called by GWT.
Hi Low,
the code itself is not public, but i could provide a smaller example (a button maybe). I'm not familiar with ZK smalltalk but it looks like an interesting option. I hope to find some time later this week, i"ll let you know.
Regards,
Jan
I did not find the time to write a smalltalk yet, but you can find some documentation on how we did it for our Geomajas GIS framework here:
http://files.geomajas.org/maven/trunk/geomajas/docbook-devuserguide/html/master.html#d4e2200
Regards,
Jan
thank you !
i will read it :)
Asked: 2010-11-03 06:56:41 +0800
Seen: 696 times
Last updated: Jul 15 '15