BootsFaces-OSP: b:dataTable causes JavaScript errors in Liferay 7.0 due to CDN resource
Liferay 7.0 exposes an AMD loader and certain JS resources do no behave well when an AMD loader is present due to anonymous modules. In order to work around these errors, the Liferay Faces Bridge filters the content of these resources slightly to disable their AMD loader features. datatables.min.js is one of the resources that we must filter. With BootsFaces v1.1.2 things worked fine, but with v1.1.3 datatables.min.js was moved to using a CDN. Since datatables.min.js is no longer present on the server, the Liferay Faces custom ResourceHandler can no longer filter the datatables.min.js resource to make it compatible with Liferay 7.0’s frontend JS.
In order to fix this, datatables.min.js should be included in the BootsFaces jar (or a ResLib jar) as it was in v1.1.2 and an option should probably be included to enable loading the resource from a CDN.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 3
- Comments: 16 (3 by maintainers)
Commits related to this issue
- #853 added the option to use a custom datatables.js and / or datatable.css — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 performance optimization (added Kyle's improvements) — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- TheCoder4eu/BootsFaces-OSP#853 explaining how to use b:dataTable behind a firewall — committed to TheCoder4eu/BootsFacesWeb by stephanrauh 8 years ago
- TheCoder4eu/BootsFaces-OSP#853 adding a live demo (part 1) — committed to TheCoder4eu/BootsFacesWeb by stephanrauh 8 years ago
- #853 improved the comment — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 removed debug code — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 finished the implementation — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- TheCoder4eu/BootsFaces-OSP#853 adding a live demo (part 2) — committed to TheCoder4eu/BootsFacesWeb by stephanrauh 8 years ago
- #853 added missing brace — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 verifying if the showcase uses the current version of the snapshot — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- Revert "#853 verifying if the showcase uses the current version of the snapshot" This reverts commit 88483c76b647eb1d7bd5726fd9b9c35207852cd8. — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- TheCoder4eu/BootsFaces-OSP#853 updated the dependencies (including BootsFaces itself) :) — committed to TheCoder4eu/BootsFacesWeb by stephanrauh 8 years ago
- TheCoder4eu/BootsFaces-OSP#853 downgraded the dependencies (except BootsFaces itself) :) — committed to TheCoder4eu/BootsFacesWeb by stephanrauh 8 years ago
- TheCoder4eu/BootsFaces-OSP#853 updated to BootsFaces 1.4.0-SNAPSHOT — committed to TheCoder4eu/BootsFacesWeb by stephanrauh 8 years ago
- #853 added the option to use a custom datatables.js and / or datatable.css — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 performance optimization (added Kyle's improvements) — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 improved the comment — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 removed debug code — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 finished the implementation — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
- #853 added missing brace — committed to TheCoder4eu/BootsFaces-OSP by stephanrauh 8 years ago
@stephanrauh and @TheCoder4eu, there are any news about this issue? Our client machines does not have internet connection, so we need this issue resolved in order to upgrade BootsFaces version.
I’ve finished the first demo at https://staging.bootsfaces.net/Showcase/layout/resourcemanagement.jsf.
Currently, the demo only demonstrates how to use the web.xml parameter. The other detection mechanisms still need a demo in the showcase.
@stephanrauh, looks good 😃 Minor tweaks:
You may be able to skip the looping check if
get_datatable_from_cdn==false. You may be able to abort the loop (break) whenloadDatatablesis set tofalse.@stephanrauh Is this enhancement planned to be in upcoming releases? I can’t update my version of Bootsfaces without a solution for this.
@stephanrauh nice idea.
@stephanrauh, include
datatables.min.jsanddatatables.min.cssin tojar, otherwise<b:dataTable />not going to work without internet connection.