amitjain1982 / remote-pagination

Apache License 2.0
11 stars 16 forks source link

Doesn't work with asset-pipeline and custom jquery (non-plugin) #21

Open harbdog opened 8 years ago

harbdog commented 8 years ago

I'm using Grails 2.4.2 with asset-pipeline plugin, and I can't for the life of me figure out how to get remote pagination to work with my project (https://github.com/harbdog/roguemek) due to this error:

GrailsTagException Message: No javascript provider is configured

From what searches I've done for the last few hours I've only found how to get it to work using the Resources plugin and using the jquery plugin. But I'm using a newer version of jquery (2.2.0) than the plugin has so that is out of the question, and I like asset-pipeline so don't want to switch back to Resources plugin.

Is there any way to get remote-pagination working in my project?

amitjain1982 commented 8 years ago

This plugin needs jQuery to run it. It only needs the jQuery library to be available on the page it doesn't have to jQuery plugin. Is the jQuery library available on your page?

harbdog commented 8 years ago

Yes, jQuery was available on the page I was loading, just instead of loading jquery via BuildConfig.groovy I load from my javascript file like this:

//= require jquery.min.js

I'm guessing since it is not directly loaded from the gsp is why the exception was generated. I ended up just using the standard g:paginate taglib with custom javascript to load new data with ajax.