Java JSF Primefaces 6.0推送

Java JSF Primefaces 6.0推送,java,sockets,jsf,primefaces,push,Java,Sockets,Jsf,Primefaces,Push,我有个问题 我是否需要一个新的请求来获取bean属性的新值?我想在不重新加载页面的情况下通过push刷新outputtext <p:outputLabel value="PushString"/><h:outputText id="out" value="#{testController.pushString}" styleClass="display" /> <p:socket onMessage="handleMessage" channel="/imageSt

我有个问题

我是否需要一个新的请求来获取bean属性的新值?我想在不重新加载页面的情况下通过push刷新outputtext

<p:outputLabel value="PushString"/><h:outputText id="out" value="#{testController.pushString}" styleClass="display" />
<p:socket onMessage="handleMessage" channel="/imageStream" />
在ManagedBean中,eventBus将字符串发布到端点:

eventBus.publish("/imageStream", pushString);
但是我必须重新加载页面才能获得字符串的新值

我的应用服务器是嵌入式Jetty 9.3

我必须为primefaces push配置webappContext吗

<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime</artifactId>
    <version>2.4.8</version>
</dependency>
<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime-native</artifactId>
    <version>2.4.8</version>
</dependency>

组织气氛
大气运行时间
2.4.8
组织气氛
大气运行时本机
2.4.8

您在标题中添加了3个标签和一个版本号,没有提出任何问题。你能改进一下吗?你在标题中添加了3个标签和一个版本号,没有一个真正的问题。你能改进一下吗?
<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime</artifactId>
    <version>2.4.8</version>
</dependency>
<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime-native</artifactId>
    <version>2.4.8</version>
</dependency>