0

gwt integration in zk 5

asked 2010-11-03 06:56:41 +0800

jandm gravatar image jandm
15

updated 2010-11-04 07:33:13 +0800

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

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2010-11-04 19:32:37 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

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.

link publish delete flag offensive edit

answered 2010-11-09 04:11:30 +0800

jandm gravatar image jandm
15

updated 2010-11-09 04:11:44 +0800

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.

link publish delete flag offensive edit

answered 2011-02-10 03:29:55 +0800

hengsin gravatar image hengsin
39

Hi Jan,

I'm also interested on the use of GWT component in ZK application, is it possible for you to share your GWT integration code ? Maybe something like a ZK smalltalk ?

Thanks & Regards,
Low

link publish delete flag offensive edit

answered 2011-02-14 04:21:03 +0800

jandm gravatar image jandm
15

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

link publish delete flag offensive edit

answered 2011-02-24 08:07:28 +0800

jandm gravatar image jandm
15

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

link publish delete flag offensive edit

answered 2011-05-01 22:41:06 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

thank you !
i will read it :)

link publish delete flag offensive edit

answered 2015-07-15 20:52:12 +0800

xdbrian gravatar image xdbrian
1

Hi!. I'm Starting with Geomajas and zk , and I find myself drifting in trying to integrate the two frameworks , someone Florist share new information on the subject .

link publish delete flag offensive edit

answered 2015-07-15 20:53:06 +0800

xdbrian gravatar image xdbrian
1

Hi!. I'm Starting with Geomajas and zk , and I find myself drifting in trying to integrate the two frameworks , someone could share new information on the subject .

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: 2010-11-03 06:56:41 +0800

Seen: 696 times

Last updated: Jul 15 '15

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