4

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.

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
leo
  • 3,045
  • 5
  • 24
  • 23

1 Answers1

12

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.

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102