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

相关文章推荐

What Does __read_mostly In The Linux Kernel Do?

If you have spent any time looking at Linux kernel code you have undoubtedly come across the__read_m...

What does ContextLoaderListener do in Spring?

In web.xml, there is usually the following line     org.springframework.web.context.ContextLoader...

[stackoverflow翻译] “yield” 关键字有什么用?what-does-the-yield-keyword-do

问: 在Python中 yield 关键字有什么用? 他是做什么的? 例如,我正在尝试理解下面的代码1: def _get_child_candidates(self, distance, mi...

ExpressJs - 04 - what does express.static(__dirname) point do?

In Node, the __dirname is a global object that contains the name of the directory that the executing...

What does the “yield” keyword do? (转)

原文链接:stackoverflow.com/questions/231767/what-does-the-yield-keyword-do To understand what yield doe...

What Does The HANDLECOLLISIONS Parameter Do? [ID 966207.1]

In this Document Goal Solution Explanation of HANDLECOLLISIONS HANDLECOLLISIONS and PKUPDATE...

What does functools.wraps do?

In a comment on the answer to another question, someone said they weren't sure what functools.wraps...

What does (Aborted) mean in HttpWatch?

What does (Aborted) mean in HttpWatch?The result column in HttpWatch may sometimes display the value...

What is 'JNDI'? What does 'JDNI' do?

文章转自:http://blog.csdn.NET/cymm_liu/article/details/34417907JNDI是 Java 命名与目录接口(Java Naming and Direct...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)