What does the PF function do in Primefaces

转载 2015年11月19日 22:51:19

The PF function is a part of PrimeFaces's JavaScript API. It looks up a Javascript object that is the backbone of the JSF component on the client-side. Here is its definition (source):

PF = function(widgetVar) {      
        var widgetInstance = PrimeFaces.widgets[widgetVar];

        if (!widgetInstance) {
            PrimeFaces.error("Widget for var '" + widgetVar + "' not available!");

        return widgetInstance;

PF is a shortcut for PrimeFaces.widgets['someWidgetId'], which just looks-up a Javascript object in global scope, and so the Javascript object can also be retrieved using window['someWidgetId'].

The PrimeFaces's Javascript API has no official documentation online, so to understand what you can really "do" with the Javascript object, you'll need to take a deep dive into PrimeFaces.

See also

PrimeFaces 核心源码 js

primefaces/src/main/resources/META-INF/resources/primefaces/core/core.js  (function(window) { ...
  • DViewer
  • DViewer
  • 2015年11月19日 23:10
  • 1136

What does the SQLCODE Function do

What does the SQLCODE Function do? The SQLCODE function returns the error number associated with th...
  • fick777
  • fick777
  • 2012年02月25日 15:17
  • 248

What does the SQLERRM Function do

What does the SQLERRM Function do? The SQLERRM function returns the error message associated with t...
  • fick777
  • fick777
  • 2012年02月25日 15:15
  • 292

Mongoose - What does the exec function do?

16down voteaccepted Basically when using mongoose, documents can be retrieved using helpe...
  • qq_26222859
  • qq_26222859
  • 2017年02月14日 17:05
  • 212

What is DMA and what does it do?

  • robertsong2004
  • robertsong2004
  • 2015年07月16日 10:05
  • 500

What does sp_reset_connection do

http://www.sqldev.net/misc/sp_reset_connection.htm sp_reset_connection resets the following aspec...
  • FBug
  • FBug
  • 2012年02月22日 17:33
  • 1103

What does volatile do?

 What does volatile do?This is probably best explained by comparing the effects that volatile and sy...
  • changewang
  • changewang
  • 2006年12月08日 22:32
  • 595

What does job syspolicy_purge_history do?

1.This is came with a default installation of SQL Server 2008.What does it do? --It removes the p...
  • small_tu
  • small_tu
  • 2014年03月18日 14:27
  • 973

What does arraycommpath do?

当我们不需要CLARIION VNX存储与主机连接的时候,可以disable arraycompath 这个参数,这样在主机侧就不会有LUNZ的设备 当需要有数据盘过去的时候,可以enable这个参...
  • kinges
  • kinges
  • 2013年08月02日 06:50
  • 1413

What does super.clone() do?

翻译自:https://www.pixelstech.net/article/1420629927-What-does-super-clone%28%29-doObject 类中声明了一个受保护的方法...
  • lgh1992314
  • lgh1992314
  • 2018年01月15日 11:32
  • 85
您举报文章:What does the PF function do in Primefaces