Skip to content
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

loading data via 'url' not working #316

Open
NatalieErdmann opened this issue Nov 28, 2016 · 6 comments
Open

loading data via 'url' not working #316

NatalieErdmann opened this issue Nov 28, 2016 · 6 comments

Comments

@NatalieErdmann
Copy link

Hi,

our table remains empty when we try to load data via 'url' attribute. We tried absolute and relative urls.

Version:

<dependency>
    <groupId>com.github.dandelion</groupId>
    <artifactId>datatables-jsp</artifactId>
    <version>1.1.0</version>
</dependency>

Table:

<datatables:table id="krankenkassenList" url="krankenkassen/list">
   
    <datatables:column property="name" title="Name"/>

</datatables:table>

Everything is fine when we are using 'data' attribute. Also it's working when we use 'url' attribute and add some question marks to the end of the url (in this case: "krankenkassen/list????"). I see that the method behind the rest interface is called twice then. Without question marks it's called once, but the table remains empty.

I think it's a bug, or does anyone have a hint how we could fix this?

@NatalieErdmann
Copy link
Author

NatalieErdmann commented Nov 29, 2016

Hello again,

I found out that there are some js inclusion at the end of the page:

<script src="/myApp/dandelion/jquery/js/jquery.js"></script>
<script src="/myApp/dandelion/datatables/js/jquery.dataTables.js"></script>
<script src="/myApp/dandelion-assets/bbf6b3372d2dcfbb8686fe17b33cdf91/js/dandelion-datatables-311a8e67d0b412ebcd1b6db403737fd0.js"></script>

Those are missing when I remove the question marks from the url.

After I added

    <%@ taglib prefix="dandelion" uri="http://github.com/dandelion" %>
    <dandelion:bundle includes="jquery,jquery-ui,datatables,bootstrap-datepicker" />

in the jsp and overwrote the included jquery (old version 1.11.3 wtf), there are a few js inclusions in the renderer html (without question marks in url):

<script src="/myApp/scripts/jquery/js/jquery-3.1.1.min.js"></script>
<script src="/myApp/scripts/jquery.dataTables.min.js"></script>
<script src="/myApp/dandelion/bootstrap2/js/bootstrap.js"></script>
<script src="/myApp/dandelion/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>

As you can see the (generated?) /myApp/dandelion-assets/bbf6b3372d2dcfbb8686fe17b33cdf91/js/dandelion-datatables-311a8e67d0b412ebcd1b6db403737fd0.js is missing.
How do I include this asset? There is a random string in the file name, so I don't know how to include it...

Thanks in advance

@NatalieErdmann
Copy link
Author

Hi there,

problem was about nested jsps and caching. Disabling caching in dandelion_prod.properties solved the problem.

@NatalieErdmann
Copy link
Author

Hi there,

disabling caching was actually no good solution. Client says that website is loading too slow now, so we have to enable caching again...
Any other solutions? Don't want to switch framework.

@MaggiWuerze
Copy link

would you happen to know a good alternative? since this project seems to be dead we would like to migrate to something that is under active development but haven't found something yet

@NatalieErdmann
Copy link
Author

We are using https://datatables.net/ and a custom implementation now...

@MaggiWuerze
Copy link

aah shoot, hoped i could prevent having to do that, thanks anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants