I am working with Primefaces 3.1 and I found a bug in the jquery.js used (the bug is described and fix here: http://forum.jquery.com/topic/datepicker-doesn-t-work-inside-fixed-div). I am wondering if there is an elegant way for replacing the .js?
The replacement directly in the jar cannot be done because we are using Maven and I don't want to customise a library.
Currently, I replaced the HeadRenderer to remove the jquery.js from the header and I added my own js file, but there's maybe a Primefaces built-in option to do the same?
Just put the desired jquery. js file in your own webapp project with the same resource identifier as PrimeFaces is using for its bundled jQuery: primefaces:jquery/jquery. js . Webapp's own resources with the same identifier have loading precedence over those in JARs.
JQuery extensionsPrimeFaces relies heavily on JQuery for interacting with the DOM. Many JQuery plugins are included that are used by the various widgets.
Just put the desired jquery.js
file in your own webapp project with the same resource identifier as PrimeFaces is using for its bundled jQuery: primefaces:jquery/jquery.js
. Webapp's own resources with the same identifier have loading precedence over those in JARs.
Thus, here:
WebContent |-- META-INF |-- WEB-INF |-- resources | |-- primefaces | | `-- jquery | | `-- jquery.js : :
Alternatively, just upgrade PrimeFaces itself. 3.1 is quite ancient anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With