Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在GWT服务器端代码中,我希望与接口交互_Gwt_User Interface_User Experience_Jsni - Fatal编程技术网

在GWT服务器端代码中,我希望与接口交互

在GWT服务器端代码中,我希望与接口交互,gwt,user-interface,user-experience,jsni,Gwt,User Interface,User Experience,Jsni,我想知道在服务器端与后端接口交互是否可能以及如何可能 在服务器端方法中,我执行几个查询,afetr each查询结果我希望更改界面中显示的progressbar(以便为用户添加良好的UX反馈)。 问题在于服务器端代码中,我无法调用JSNI方法来执行此操作: // call query 1 and return results $doc.getElementById("myProgressBar").style.width='30%'; // call query 2 and return

我想知道在服务器端与后端接口交互是否可能以及如何可能

在服务器端方法中,我执行几个查询,afetr each查询结果我希望更改界面中显示的progressbar(以便为用户添加良好的UX反馈)。 问题在于服务器端代码中,我无法调用JSNI方法来执行此操作:

 // call query 1 and return results
 $doc.getElementById("myProgressBar").style.width='30%';
 // call query 2 and return results
 $doc.getElementById("myProgressBar").style.width='50%';
 // call query 3 and return results
 $doc.getElementById("myProgressBar").style.width='70%';
 //...
那么,在服务器端与界面交互的好方法是什么呢?(告诉我这是可能的,谢谢)


谢谢。

不可以,可能有很多“接口”(客户端),您如何识别哪个客户端正在做什么?看看能不能理解

回到您的问题,我要做的是在http会话中写入进度条值,并使用它来轮询(比如每5秒)请求它的服务器,直到达到100或得到异常。 希望有帮助。

看看这个,应该可以帮到你。