0

I use remote-pagination plugin (http://grails.org/plugin/remote-pagination) v. 0.3 in Grails (1.3.7) project with jQuery plugin 1.7.1. I cannot upgrade grails to new version.

I have added remote-pagination code:

<util:remotePaginate action="index" total="${usersTotal}" update="boxtitle" params="${params}"
max="${grailsApplication.config.max.size}" pageSizes="[10:'10', 30: '30', 100:'100', 300:'300', 1000:'1000']"/>

As I found that question (Grails remote-pagination is refreshing entire page instead of div) I have added

<g:javascript library="jquery" />

to header section. I have also tried :

<g:javascript library="jquery" plugin="jquery"/>

In both cases blank page loads (url isn't changed).

If I open page with right mouse click it loads correct data.

===update===

Thanks for comments. As Chrome showed a few js errors related to installed plugins, I have double checked site in fresh Firefox with WebDeveloper. No javascript errors were found, jQuery is loaded as first script.

Interesting thing I have found is that page first updates records to correct page (so plugin & ajax works - the updated data is visible just for a moment) and then browser try to load another page showing blank one.

Community
  • 1
  • 1
Milev
  • 209
  • 2
  • 6

1 Answers1

0

The page used old school counter using javascript (stat.4u.pl). When I removed it from project remote-pagination works fine. Thanks for inspiration. Chrome updated page 2 fast to notice the problem.

Short answer is: another javascript caused error.

Milev
  • 209
  • 2
  • 6
  • So when you say you removed `stat.4u.pl` from the project, did you mean you removed it from the main GitHub source and recompiled it or did you remove it from your Grails project? In either case, can you please elaborate? I am having the exact same problem as you. – aa8y Feb 18 '15 at 23:23
  • The client didn't even know they "use" stat4u. The javascript code stat4u provide is about the same I remember in 1999. As client didn't need those stats, stat4u's code was removed from project, project was recompiled and everything works fine. I didin't look for exact problem in their code. I hope that helps you. – Milev Feb 20 '15 at 10:32
  • So are you saying that the current version of the plugin is already fixed? Because I still am having the problem you are having. – aa8y Feb 20 '15 at 16:21
  • I have no problem since I removed stat4u code. Maybe you have another script that makes that problem? – Milev Feb 21 '15 at 15:38
  • So can you please elaborate the process of removing the stat4u code from the plugin. I am not really well versed with JavaScript :( – aa8y Feb 21 '15 at 15:47
  • Plugin has no stat4u. The project I worked on had it. Just right click in your browser for 'view page source' and check any javascript there. One of them might be the issue. It may be other script than stat4u. – Milev Feb 23 '15 at 11:46
  • If it is stat4u just use grep (or your editor) to find where it is in source files. If you use Windows just google for Windows grep. It can search all the files for desired string. (grep -r 'string' . in command line for chosen directory). Here you have some examples: http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-on-linux – Milev Feb 23 '15 at 11:53