ReferenceError: PF is not defined

偶尔善良 提交于 2019-12-19 05:55:09

问题


I tried the NotificationBar example of PrimeFaces, however it didn't work. I get the following JS error:

ReferenceError: PF is not defined

I think I need to include a library before using PF() function, but I don't know which library and where can I find it.


回答1:


The JS function PF() is only available since 4.0. You're apparently using PF 3.x. Look at the footer of the showcase site, it's currently saying that it's running PF 4.0.

Just use widgetVar.show(), where widgetVar is the widget variable name as you specified in widgetVar, which is bar in their showcase example.

<p:commandButton value="Show" onclick="bar.show()" type="button" />  
<p:commandButton value="Hide" onclick="bar.hide()" type="button" />  


来源:https://stackoverflow.com/questions/18076831/referenceerror-pf-is-not-defined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!