如何使用GWT实现进度条? [英] How to Implement progressbar with GWT?

查看:113
本文介绍了如何使用GWT实现进度条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在GWT应用程序中,我有一个运行服务器端并使用rpc(GWT调度程序)调用的漫长进程,我想向客户反馈一个进度条,显示消息和总进度。
我的问题是如何从服务器动态地恢复消息和进度?



我对任何解决方案感兴趣

先谢谢你的帮助。

解决方案

查看<一个href =http://code.google.com/p/google-web-toolkit-incubator/wiki/ProgressBar =nofollow>孵化器。 这里是使用它的另一个例子。






UPDATE



如果要显示进度在客户端,您需要定期对服务器进行异步调用以获取进度值。换句话说,服务器需要在某个地方写入/存储进度。客户端然后对服务器进行异步调用,该服务器读取该值并将其发送回客户端,客户端可以更新进度条。


In a GWT application, I have a long process that runs server side and invoked using rpc(GWT dispatcher) and I want to have a feedback to the Client as a progress bar showing messages and the total progress. My question is how to recover messages and the progress dynamically from the server?

I'm interested in any solution

thank you in advance for your help.

解决方案

Have a look at the get progress bar in the incubator. Here is another example of someone using it.


UPDATE

If you want to display the progress on the client side, you will need to make async calls to the server periodically to fetch the progress value. In other words, the server needs to write / store somewhere how far it is with its progress. The client then makes an async call to the server, which reads that value and sends it back to the client, which can update the progress bar.

这篇关于如何使用GWT实现进度条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆