如何获得 PrimeFaces widgetVar 函数列表? [英] How can I get a PrimeFaces widgetVar function list?

查看:23
本文介绍了如何获得 PrimeFaces widgetVar 函数列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以将我重定向到一个网络资源,在那里我可以找到所有 widgetVar JavaScript 函数列表的列表,例如.切换(),显示(),隐藏()等.

感谢您的回复.

解决方案

PrimeFaces 10 之前

您可以找到GitHub 上所有小部件的 JavaScript 源.例如:datatable.js.

您也可以打开浏览器的 JavaScript 控制台并输入:

PF('yourWidget').__proto__

这会给你属性列表(包括函数).在 http://www.primefaces.org/showcase/ui 上试试/data/datatable/filter.xhtml

PF('customersTable').__proto__

在 Chrome 中,这会生成一个带有可折叠节点的对象:

▼ c {SORT_ORDER: Object}▶ SORT_ORDER:对象▶ _render: 函数()▶ addGhostRow: function()▶ addResizers: function()▶ addRow: function()▶ addSelection: 函数(a)▶ addSortMeta: 函数(a)...

此外,在 showcase 旁边还有 文档 你应该看看.对于许多组件,客户端 API 都有详细记录,请参见例如:https://primefaces.github.io/primefaces/8_0/#/components/datatable?id=client-side-api

PrimeFaces 10 及以上

从 PrimeFaces 10 开始,有专门的 PrimeFaces JavaScript API 文档.>

Can someone redirect me to a web resource, where I can find list of all widgetVar JavaScript functions list, eg. toggle(), show(), hide () etc etc.

Appreciate your response.

解决方案

Before PrimeFaces 10

You can find the JavaScript sources of all widgets at GitHub. For example: datatable.js.

You can also open your browser's JavaScript console and type:

PF('yourWidget').__proto__

That will give you the properties list (including functions). Try it at http://www.primefaces.org/showcase/ui/data/datatable/filter.xhtml

PF('customersTable').__proto__

In Chrome this results in an object with collapsible nodes:

▼ c {SORT_ORDER: Object}
  ▶ SORT_ORDER: Object
  ▶ _render: function()
  ▶ addGhostRow: function()
  ▶ addResizers: function()
  ▶ addRow: function()
  ▶ addSelection: function(a)
  ▶ addSortMeta: function(a)
  ...

Also, next to the showcase there is also documentation you should have a look at. For many components the client side API is well documented, see for example: https://primefaces.github.io/primefaces/8_0/#/components/datatable?id=client-side-api

PrimeFaces 10 and up

From PrimeFaces 10 there is dedicated PrimeFaces JavaScript API documentation.

这篇关于如何获得 PrimeFaces widgetVar 函数列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆