Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Primefaces 奇怪的行为<;f:事件>;_Primefaces_Jsf 2_Httplistener - Fatal编程技术网

Primefaces 奇怪的行为<;f:事件>;

Primefaces 奇怪的行为<;f:事件>;,primefaces,jsf-2,httplistener,Primefaces,Jsf 2,Httplistener,我使用PrimeFaces5、Glassfish服务器版本4和firefox作为浏览器。我正在通过Netbeans8.0.1开发一个web应用程序,在index.xhtml页面中,我需要在每次登录时显示提示列表。 为此,我在index.xhtml页面中使用了以下代码 <f:event type="preRenderView" listener="#{promemoriaController.promemoriaInScadenza()}"/> 此“f:event”位于“f:me

我使用PrimeFaces5、Glassfish服务器版本4和firefox作为浏览器。我正在通过Netbeans8.0.1开发一个web应用程序,在index.xhtml页面中,我需要在每次登录时显示提示列表。 为此,我在index.xhtml页面中使用了以下代码

<f:event type="preRenderView" listener="#{promemoriaController.promemoriaInScadenza()}"/>

此“f:event”位于“f:metadata>标记之外。 我不知道为什么,但是f:event listner在每次登录时执行两次。 我确信promemoriaController.promemoriaInScadenza()的用法仅在f:event>中使用。
非常感谢您的回复

检查您的
标记是否在
内部-如果是,请将其放在外部。

看起来像此
元素的容器,呈现了2次。1次来自初始页面加载,另一次可能来自某个ajax操作


您可以检查此操作的所有父元素,并查看是否从另一个操作调用了其中任何一个进行更新“属性也会触发一些意外的更新和重新渲染

在外部。它在中。您能提供它的父元素的路径吗,从到?另外,您有任何autoUpdate=“true”的组件吗?或者任何使用Netbeans 8.0.1重新加载整个@FormI的事件。运行时如何找到从到的路径?对于具有autoupdate=“true”的元素,我没有找到任何内容。好的,我已使用autoupdate=“true”找到了。删除后,一切正常。