我正在尝试实现位于here的PrimeFaces notify示例。我已经实现了与链接示例中显示的完全相同的代码,但每次我尝试运行它时,web控制台中都会出现以下错误。
Websocket failed. Downgrading to Comet and resending
push.js.xhtml?ln=primefaces&v=5.1:1 GET http://localhost:8080/Notify/primepush/notify?X-Atmosphere-tracking-id=0&…ng&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true&_=1426529434646 404 (Not Found)我已经满足了primefaces 5.1和jsf 2.2.6的所有依赖项。我真的被困在这个问题上了。我不太明白我错过了什么。以前有没有人遇到过这种情况?
发布于 2016-04-06 19:23:05
我想你的问题出在这里。
在您的.xhtml文件中的ui:define和script标记之间包含以下内容
<ui:define name="metadata">
<script>
function doGrowling(){
growlUi.renderMessage({summary: "Summary goes here", detail: "Detail goes here", severity: 0});
}
</script>
</ui:define>之后,从支持bean中执行javascript函数,如下所示:
public void executeGrowlMessage(){
RequestContext.getCurrentInstance().execute("doGrowling();");
}https://stackoverflow.com/questions/29084164
复制相似问题