JSF:使用AJAX推送与ICEfaces的(ICEpush) [英] JSF: Using AJAX push with ICEfaces (ICEpush)

查看:212
本文介绍了JSF:使用AJAX推送与ICEfaces的(ICEpush)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ICEfaces的与ICEpush一些数据推送到浏览器。

I'm using ICEfaces with ICEpush to push some data to the browser.

然而,它并不像工作计划:它并没有AJAX,它只是调用来自像任何其他非Ajax动作的动作的动作和回报确实

However, it does not work like planned: It does no AJAX, it just invokes the action and returns from the action like any other non-AJAX action does.

我使用的是最新的ICEfaces和ICEpush版本和战斧7和JSF 2

I'm using the newest ICEfaces and ICEpush versions and Tomahawk 7 and JSF 2.

它的工作原理既不的Servlet 2.5,也不Servlet的3.0。

It works with neither Servlet 2.5 nor Servlet 3.0.

这些都是我的bean的重要组成部分(视图范围):

These are the important parts of my bean (view scoped):

public AjaxTest() {
    PushRenderer.addCurrentSession(PUSH_GROUP);
}

    public void addText() throws InterruptedException {
    for(int i = 0; i < 5; i++) {
        lines.add("line " + i);
        PushRenderer.render(PUSH_GROUP);
        Thread.sleep(1000);                     
    }
}

这是我的窗体的一个片段:

And this is a snippet of my form:

    <h:panelGroup>
        <h:dataTable id="ajaxTestTable" value="#{ajaxTest.lines}" var="line">
            <h:column>
                <h:outputText value="#{line}" />
            </h:column>
        </h:dataTable>
        <h:commandButton id="startAjax" value="Start"
            action="#{ajaxTest.addText}" />
    </h:panelGroup>

我错过了什么?谢谢!

Did I miss something? Thanks!

推荐答案

ICEfaces的2.0尚未与MyFaces的。您是否尝试过与包括Mojarra .jar文件的应用程序?

ICEfaces 2.0 is not yet integrated with MyFaces. Have you tried your application with the included Mojarra .jar files?

这篇关于JSF:使用AJAX推送与ICEfaces的(ICEpush)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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