How can I get a PrimeFaces widgetVar function list?

后端 未结 1 924
梦毁少年i
梦毁少年i 2020-12-20 07:13

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.

Appr

相关标签:
1条回答
  • 2020-12-20 07:24

    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('carsTable').__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

    0 讨论(0)
提交回复
热议问题