Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a PrimeFaces widgetVar function list?

Tags:

jsf

primefaces

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.

like image 313
leo Avatar asked Oct 17 '25 15:10

leo


1 Answers

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.

like image 100
Jasper de Vries Avatar answered Oct 21 '25 06:10

Jasper de Vries



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!