我离开页面时,JSF f:view beforePhase多次触发 [英] JSF f:view beforePhase firing multiple times as I LEAVE the page
问题描述
仍然试图让我的页面加载器在JSF中疯狂发动的问题>
通过此链接: http://www.javabeat.net/tips/122-jsf-best-practices.html
看来,如果我输入,它将在进入页面时触发一次.
但是,离开页面时它会触发4次,有点失误.有什么想法吗?
只要阶段改变,它就会触发".例如,通过添加将 event.getPhaseId()
与 PhaseId.RESTORE_VIEW
进行比较的条件,可以使阶段监听器中的代码仅在特定阶段被触发.>
Still trying to get my problems with page loaders firing like crazy in JSF>
From this link: http://www.javabeat.net/tips/122-jsf-best-practices.html
It appears that if I put a that it will fire once when entering the page.
However, it fires like 4 times when LEAVING the page, kind of defeats the point. Any ideas?
It "fires" whenever the phase changes. You can make your code in the phase listener be triggered only on certain phases, by adding a condition comparing event.getPhaseId()
with PhaseId.RESTORE_VIEW
, for example.
这篇关于我离开页面时,JSF f:view beforePhase多次触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!