Server lock

asked 2016-10-07 01:20:07 +0800

Gemteks gravatar image Gemteks
1 1

updated 2016-10-07 01:21:38 +0800

Hi all,

Since I can't find appropriate chart ui in zk chart, I want to make a chart ui myself. I use html svg to achieve it. Then I want to use server push to push data to client, and then svg would show the latest infomation.

My is as below. AuResponse is used to send current temperature value to client and then svg ui show it. Api doc tells that Executions.activate(desktop) would pause current thread until the page is ready or other condition... So when I browsed this page, controller would execute to this line and paused. My question is that how to break thread pause and let it continue execute.


-------------Controller------------ Executions.activate(desktop); . . AuResponse response = new AuResponse("temperature", new Object[]{val}); Clients.response(response); . . Executions.deactivate(desktop);

------------Client------------ <zk xmlns:n="native"> <window title="new page title" border="normal" apply="com.gemtek.au.ClientSideHandler">

<script defer="true"> zAu.cmd0.temperature = function (val) { zk("#tempUI").animate({'height',100-val},1000); zAu.send(new zk.Event(zk("#tempUI"), "onFoo", {foo: 'my data'}, {toServer:true})); }; </script>

<n:svg viewbox="0 0 145 145">
<n:rect x="30" y="25" width="30" height="100" fill="#1565c0"/> <n:rect x="30" y="25" width="30" height="0" fill="#edebeb" id="tempUI"/> </n:svg> </window> </zk>

delete flag offensive retag edit
Be the first one to answer this question!
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

1 follower



Asked: 2016-10-07 01:20:07 +0800

Seen: 18 times

Last updated: Oct 07 '16

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