开发者

Open Popup from servlet or jsf managed bean?

开发者 https://www.devze.com 2023-01-10 00:12 出处:网络
Is there any way to open a popup from a servlet I have an asynchronous process running , and I need to somehow notify the开发者_开发问答 user when finished, without having to refresh the page

Is there any way to open a popup from a servlet I have an asynchronous process running , and I need to somehow notify the开发者_开发问答 user when finished, without having to refresh the page

any ideas ??


"Without having to refresh the page"

That's what Ajax is all about I suggest that you take a look to some Ajax enable JSF framework, like Richfaces, if you're using JSF 2.0 you can use Ajax behavior by default.

With Richfaces you can use the <a4j:poll> to check after some period of time if the asynchronous process have finished, you can then re-render the appropriate message.

 <a4j:poll interval="1000" enabled="#{notificationBean.isTaskComplete}"
                reRender="completeMessagePanel" />

Thats the general Idea.

0

精彩评论

暂无评论...
验证码 换一张
取 消