How to add Primefaces TreeTable / TreeGrid widget?
We want to add a widget (treetable) that doesn't exist in Richfaces. We have added Primefaces jar to the nxserver/lib folder, but we had some problems, because in some pages both libraries (RF and PF) are loading their own jQuery with different versions (RF has 1.8.3 and PF 1.11).
To solve this problem, we want both libraries to point to the same jQuery version, and we have followed this tutorial: http://rik-ansikter.blogspot.com.es/2012/02/re-routing-jsf-resource-requests-with.html:
- We have created META-INF/richfaces/static-resource-mappings.properties with this configuration:
- We have added the jQuery 1.11 script in META-INF/resources/org.richfaces.staticResource/ directory.
- To correct jQuery deprecated methods used in RF, we also use jquery-migrate-1.2.1 script.
Now, everything works ok in normal pages, but when we access the page with PF widget, we get this error in the console of the browser:
Uncaught TypeError: Cannot call method 'remove' of null primefaces.js.faces?ln=primefaces:1 PrimeFaces.widget.BaseWidget.Class.extend.init primefaces.js.faces?ln=primefaces:1 PrimeFaces.widget.Button.PrimeFaces.widget.BaseWidget.extend.init primefaces.js.faces?ln=primefaces:16 prototype.(anonymous function) primefaces.js.faces?ln=primefaces:1 Class primefaces.js.faces?ln=primefaces:1 PrimeFaces.createWidget primefaces.js.faces?ln=primefaces:1 PrimeFaces.cw primefaces.js.faces?ln=primefaces:1 (anonymous function)
The error occurs when it tries to call:
We know that this error happens when different versions of jQuery are loaded together, but we have checked that only one version is loaded. Why does the error still happen?
How can we integrate Primefaces with Nuxeo in a proper way?
Is there any other library with TreeTable style widgets that we can use in Nuxeo? (If it is possible, with JSF support)
Thank you in advance,