PF功能在Primefaces中有什么作用? [英] What does the PF function do in Primefaces?
问题描述
在许多地方都可以找到使用Primefaces的功能PF
的用法.例如在此 answer
On many places one can find usage of a function PF
with Primefaces. For example in this answer
从到目前为止所见,这似乎是一种神奇的使它工作得更好"的功能.但是我不相信这种东西,所以:
From what I have seen so far it seems to be a magic "make it work a little better" function. But I don't believe in this kind of stuff so:
此功能做什么?
在哪里可以找到有关它的文档?
And where can I find documentation about it?
推荐答案
PF
是Javascript函数.
PF
is a Javascript function.
在Primefaces 4.0中,更改了小部件的Javascript范围.在4.0版之前,您可以使用widgetVar.show();
打开对话框小部件.
In Primefaces 4.0 the Javascript scope of widgets changed. Prior to version 4.0 you could open a dialog widget with widgetVar.show();
.
在Primefaces 4.0及更高版本中,小部件存储在Javascript小部件数组中.当您调用PF('widgetVar')时,它将在数组中查找小部件并返回它.
In Primefaces 4.0 and above the widgets are stored in a Javascript widget array. When you call PF('widgetVar') it is looking for the widget in the array and returning it.
PF=function(d){
var c=b.widgets[d];
if(!c){
if(a.console&&console.log){
console.log("Widget for var '"+d+"' not available!")
}
b.error("Widget for var '"+d+"' not available!")
}
return c
};
我在此上找不到很多,这就是我使用Chrome的开发人员工具能够解密的内容.
I could not find much on this either this is what I was able to decipher using Chrome's developer tools.
这篇关于PF功能在Primefaces中有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!