-
Notifications
You must be signed in to change notification settings - Fork 24
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
Easygrid fails with template not found error #123
Comments
Controller: def workspaceGrid = {
Error 500: Error processing GroovyPageView: Template not found for name [/templates/easygrid/jqGridRenderer] and path [/templates/easygrid/_jqGridRenderer.gsp] |
grid:grid name="workspace" addUrl="${g.createLink(controller: 'assigned', action: 'workspace')}"> |
You need to run the |
Thank you it worked. |
How do I pass external parameters to view from controller method. Ex: username, list of particular group users. If try to access existing bean userService which handles springSecurity it complains saying object is null even though I can access that bean in other controller methods. |
tudor, For some reason formatter is not getting called for jqgrid. I have put alert but it doesnt go there. |
Hi, Regarding your first question: How do I pass external parameters to view from controller method? Second question: For some reason formatter is not getting called for jqgrid. I have put alert but it doesnt go there. My application already has jqgrid plugin and looks like both conflict. Is it possible to have both jqgrid plugin and easy grid in one grails application? |
Here is what I am trying to achieve. I had to remove left < symbol to see on the preview. grid:grid name="workspace" addUrl="${g.createLink(controller: 'assigned', action: 'workspace')}"> g:javascript>
/g:javascript> Controller: def workspaceGrid = {
My second question is after installing easy grid my existing JQgrid application is not working. It deosn't show grid at all. Is it because of particular version has conflict? Below what I have in my buildConfig. compile ":jqgrid:3.8.0.1" Thanks. |
Tudor, Not sure you got chance to look at this issue. My lead is pressuring me to solve this issue. I have tried several versions of hyper link. None are working. Can you please help. Thanks. |
Hi, Can you tell me again what is it exactly you are trying to achieve? Regarding the conflict with the jqgrid plugin. I never tried it together with easygrid. So , there might be issues with the resources. Both plugins come bundled with a version of jqgrid. |
Nothing much. Ex: Think I have two columns. One is 'id' and other is http://199.231.186.169:8080/petclinic/overview/index user will click on view button in the navigator, it will show link on code I am not able put link under 'code' column. I have copied same exact code On Wed, Oct 8, 2014 at 3:38 PM, Tudor Malene [email protected]
|
Now I understand. Can you check if you have some javascript errors in the console. |
This time I am trying to put link under Id column. I don't see any errors on console. I am using same Controller to get data and create link which takes to same Controller for different method.See below for generated html. I took out all JQgrid libraries and only using easyGrid. Hope you can spot something.
|
Look at below code. For some reason formatter is not working. I have copied my local code and grails pet clinic code. How do I go about fixing this one?
|
The problems seems to be that the custom JSON marshallers that easygrid registers in order to render the javascript , are for some reason not called. What version of grails / jdk are you using? |
Grails 2.2.5 and jdk 1.6. |
Check :easygrid:1.6.7 |
Thank you. I will compile and see if it solves the problem. On Wed, Oct 15, 2014 at 3:34 AM, Tudor Malene [email protected]
|
After taking latest build its working now. Thank you for that. I need 1 more help from you. See below code. There is drop down of users and I need to pass username to controller Grid. How do I pass? Based on that userName I query the database.
|
here is the controller code which doesnt work
|
Hi. In the gsp you have to use some javascript:
This code was not tested. Just to show the general idea |
Thanks. I got it working. Meanwhile I have few more questions. Hope I am not bothering you a lot. Question 1: applying search filter on complex queries. See below code. How do I apply search filter on each column?
|
Answer Q1:
Basically, any search term you enter in the search fields of jqgrid will append the filterClosure of that column to the main query. Answer Q2:
|
Search is not working for me. Most of the examples are single table queries. I am not finding multiple table join examples. How do I go about printing the main sql which is generated by easygrid? How to check what is returned from controller method? |
To log sql queries: http://grails-dev.blogspot.co.uk/2013/06/how-to-log-sql-statements-in-grails.html For a grid with joins see: https://github.com/tudor-malene/grails-petclinic/blob/master/grails-app/controllers/org/grails/samples/VetScheduleController.groovy#L99 To see the json output, use the ${gridName}Rows controller method. Like this : http://199.231.186.169:8080/petclinic/overview/ownersRows?rows=10&page=1&sidx=&sord=asc |
Thanks. I feel we had more flexibility with grails JQgrid and we could play with query in controller and pass json data. May be it is taking me time to fully get the potential of easygrid. It would be good if you add flexibility to pass params through grid. JQGrid had option like below where we could pass paramas while calling the controller method. Easygrid complains params is null. It only takes postData after initial call. What if you want to load grid based on previous page params. Is it possible with easygrid? url="'${createLink(action: 'listJSON', params: [department: params.department, range1: params.range1, range2: params.range2, status: params.status, type: params.type, view: params.view, format: params.format, extension: params.extension])}'" |
You can pass params to the grid by using
As a matter of fact the link you mention is constructed like this in |
Are you saying that I can pass like below. <grid:grid id="details" in Controller externalParams (['range1', 'range2', 'department','view','max']) if I do params.range1 I get null pointer exception. How do I access them without globalFilterClosure? |
Unless you modify the _jqgridRenderer, you can't specify the url. By setting the externalParams, they will be passed on to jqgrid, from the parameters of the enclosing page. |
Hello,
I followed all the steps and installed easy grid 1.6.6 successfully. But when I run the application I get template not found error. Please let me know what I am missing. Below is code.
gsp:
<title>Workspace</title> function customShowFormat(cellvalue, options, rowObject){ return "" + cellvalue + " "; } /r:script /grid:gridController:
def workspaceGrid = {
Error:
Error 500: Error processing GroovyPageView: Template not found for name [/templates/easygrid/jqGridRenderer] and path [/templates/easygrid/_jqGridRenderer.gsp]
Servlet: grails
URI: /flow/grails/assigned/index.dispatch
Exception Message: Template not found for name [/templates/easygrid/jqGridRenderer] and path [/templates/easygrid/_jqGridRenderer.gsp]
Caused by: Error processing GroovyPageView: Template not found for name [/templates/easygrid/jqGridRenderer] and path [/templates/easygrid/_jqGridRenderer.gsp]
Class: index.gsp
At Line: [22]
Code Snippet:
21: <grid:set col="name" width="60" />
22: /grid:grid
23: <grid:exportButton name="workspace"/>
The text was updated successfully, but these errors were encountered: