-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
b:dataTable causes JavaScript errors in Liferay 7.0 due to CDN resource #853
Comments
@stephanrauh, include |
@chsreedhar We've extracted the file because it adds a huge amount of memory to the core library. However, we can split the BootsFaces.jar into two jars: one containing the core library, and an optional jar containing the datatable files. If the optional library is not there, we use the CDN approach. How do you like this idea? |
@stephanrauh nice idea. |
@stephanrauh Is this enhancement planned to be in upcoming releases? I can't update my version of Bootsfaces without a solution for this. |
@TheCoder4eu What's your opinion? |
@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. |
Hi @stephanrauh and @TheCoder4eu, Thanks. |
@stephanrauh, @TheCoder4eu, could you make the URL for the resource configurable via init-param so that people could provide their own local version if they want? |
@stiemannkj1 @chsreedhar @NMagarreiro @paulohva First of all, sorry for forgetting this ticket. Somehow, it got buried under a pile of new tickets. But maybe it's good we didn't implement the solution in a hurry. Kyle, I like your idea better than my original idea. Maybe you're familiar with our approach to using jQuery? I'd like to implement the same idea for the datatable:
How do you like the idea? |
@stephanrauh, sounds good to me. Perhaps you could include an example or documentation showing how to use this feature as part of the ticket? |
@stiemannkj1 Yes, sure - but give me some time :). I've pushed a tentative implementation to GitHub. It passed my first few tests, but even so, take it with a grain of salt. If you're ready to dive into the sourcecode (it's a fairly small change), follow the link above. |
@stephanrauh, looks good :) Minor tweaks: You may be able to skip the looping check if |
@stiemannkj1 @chsreedhar @paulohva @NMagarreiro I can't decided how to name the context parameter. Is it more intuitive to call it IMHO we should prefer the singular form because that's the name BootsFaces uses ( |
Current state of the art: there's some documentation, but the live demo is still being developed. What's already there should appear soon at https://showcase.bootsfaces.net/layout/resourcemanagement.jsf. |
@stephanrauh use context parameter |
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. |
…e snapshot" This reverts commit 88483c7.
…otsFaces itself) :)
…otsFaces itself) :)
…e snapshot" This reverts commit 88483c7.
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 BootsFacesv1.1.2
things worked fine, but withv1.1.3
datatables.min.js
was moved to using a CDN. Sincedatatables.min.js
is no longer present on the server, the Liferay Faces customResourceHandler
can no longer filter thedatatables.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 inv1.1.2
and an option should probably be included to enable loading the resource from a CDN.The text was updated successfully, but these errors were encountered: