问题描述
在GWT应用程序中,我有一个运行服务器端并使用rpc(GWT调度程序)调用的漫长进程,我想向客户反馈一个进度条,显示消息和总进度。
我的问题是如何从服务器动态地恢复消息和进度?
我对任何解决方案感兴趣
先谢谢你的帮助。
查看孵化器。 是使用它的另一个例子。
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实现进度条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!