反向Ajax和JSF? [英] Reverse Ajax with JSF?

查看:93
本文介绍了反向Ajax和JSF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能反向阿贾克斯在JSF 2.0工作?

Is it possible to work with reverse Ajax in JSF 2.0?

我可以使用Ajax工作JSF,但我不知道如何保持渲染。你知道吗?

I could work with Ajax in JSF, but I don't know how to keep rendering. Any idea?

推荐答案

通过反向AJAX你有投票在客户端反复查询服务器寻找一个响应,并且您已经推的服务器保持与客户端的连接,并发送响应时可用。

With reverse Ajax you have polling where the client repeatedly queries the server looking for a response, and you have pushing where the server keeps a connection with the client and sends a response when available.

RichFaces已经能 < A4J:调查> < A4J :推> 作为其Ajax支持的一部分。

Richfaces has <a4j:poll> and <a4j:push> as part of its ajax support.

&LT; A4J:推&GT; 定期进行   AJAX请求到服务器,以模拟   推数据。

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

之间的主要区别&LT; A4J:推&GT;   和&LT; A4J:调查&GT; 成分是   &LT; A4J:推&GT; 使请求最小   code只(不JSF树)为了   检查邮件的presence在   队列中。如果消息存在   完整请求将被执行。   该组件不会轮询注册   咖啡豆,但寄存器事件监听   它接收事件的消息。

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.

这篇关于反向Ajax和JSF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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