微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

用JSF反向Ajax?

是否可以在JSF 2.0中使用反向Ajax?

我可以在JSF中使用Ajax,但我不知道如何继续渲染.任何的想法?

解决方法

使用反向Ajax,您可以轮询客户端反复查询服务器以查找响应的位置,并且您已推送服务器与客户端保持连接的位置,并在可用时发送响应.

Richfaces将<a4j:poll><a4j:push>作为其ajax支持的一部分.

The <a4j:push> periodically perform
AJAX request to server,to simulate
‘push’ data.

The main difference between <a4j:push>
and <a4j:poll> components is that
<a4j:push> makes request to minimal code only (not to JSF tree) in order to check the presence of messages in the queue. If the message exists the complete request will be performed. The component doesn’t poll registered beans but registers EventListener which receives messages about events.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐