Comments (4)
This is because of a bug in the current version of dynamic-controller plugin, which I used in 1.4 to register those methods.
I notified Burt ( the author of dynamic-controller ) , so it should be resolved soon.
from easygrid.
fixed in 1.4.1
from easygrid.
Hmm, I just tried 1.4.1 and get this exception when I start my app:
context.GrailsContextLoader Error initializing the application: Cannot invoke method remove() on null object
java.lang.NullPointerException: Cannot invoke method remove() on null object
at org.grails.plugin.easygrid.builder.EasygridBuilder$_evaluateGrid_closure2.doCall(EasygridBuilder.groovy:98)
at org.grails.plugin.easygrid.builder.EasygridBuilder$1.invokeMethod(EasygridBuilder.groovy:165)
at com.ifn.country.CountryGridController$__clinit__closure1_closure2.doCall(CountryGridController.groovy:19)
at org.grails.plugin.easygrid.builder.EasygridBuilder.buildWithDelegate(EasygridBuilder.groovy:176)
at org.grails.plugin.easygrid.builder.EasygridBuilder.evaluateGrid(EasygridBuilder.groovy:49)
at org.grails.plugin.easygrid.builder.EasygridBuilder$_evaluate_closure1.doCall(EasygridBuilder.groovy:34)
at org.grails.plugin.easygrid.builder.EasygridBuilder$1.invokeMethod(EasygridBuilder.groovy:165)
at com.ifn.country.CountryGridController$__clinit__closure1.doCall(CountryGridController.groovy:14)
at org.grails.plugin.easygrid.builder.EasygridBuilder.buildWithDelegate(EasygridBuilder.groovy:176)
at org.grails.plugin.easygrid.builder.EasygridBuilder.evaluate(EasygridBuilder.groovy:33)
at org.grails.plugin.easygrid.EasygridInitService$$EOLg8NM0.generateConfigForGrids(EasygridInitService.groovy:365)
at org.grails.plugin.easygrid.EasygridInitService$$EOLg8NM0.initializeFromClosure(EasygridInitService.groovy:177)
at org.grails.plugin.easygrid.EasygridInitService$$EOLg8NM0.initControllerGrids(EasygridInitService.groovy:145)
at org.grails.plugin.easygrid.EasygridInitService$_initializeGrids_closure2.doCall(EasygridInitService.groovy:45)
at org.grails.plugin.easygrid.EasygridInitService$$EOLg8NM0.initializeGrids(EasygridInitService.groovy:43)
at EasygridGrailsPlugin$_closure3.doCall(EasygridGrailsPlugin.groovy:53)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
Here are my grid definitions:
static grids = {
countryGrid {
dataSourceType 'gorm'
domainClass Country
gridImpl 'jqgrid'
inlineEdit true
filterForm true
columns {
countryCode {
editable false
}
description
uiEnabled {
jqgrid {
edittype "'checkbox'"
}
}
}
}
callActivityGrid {
dataSourceType 'gorm'
domainClass CallActivity
gridImpl 'jqgrid'
inlineEdit true
columns {
activityTypeCode {
value {
it.activityTypeCode.name()
}
jqgrid {
edittype "'select'"
editoptions """{
value: '${Activity.ActivityTypeCode.values().collect({ it.toString() + ":" + it.toString() }).join(";")}',
dataInit: function (elem) {
alert(elem);
},
multiple: false
}"""
}
}
}
}
from easygrid.
It's because of that "filterForm true" line in 'countryGrid'.
The Builder expect filterForm to be a closure where you define the fields and other parameters.
I should have thrown a better error message there.
If you just remove that line, it will work.
Also, in 1.4.1 , you can define your grids like this:
def countryGrid = {
dataSourceType 'gorm'
domainClass Country
gridImpl 'jqgrid'
inlineEdit true
filterForm true
columns {
countryCode {
editable false
}
description
uiEnabled {
jqgrid {
edittype "'checkbox'"
}
}
}
}
But, if you do this, you will have to keep in mind that the name which you'll use to refer the grid will be without the "Grid" suffix ( just 'country' in this case)
Another suggestion would be that it may be preferable to keep the UI properties in the gsp. You can do this by overriding different properties in the tag:
For example:
<grid:grid name='callActivityGrid' columns.activityTypeCode.jqgrid.editoptions =' ......'/>
from easygrid.
Related Issues (20)
- Error GormDatasourceService
- Another database selection
- Custom datasource not paging
- Default ordering for gorm not working HOT 1
- InlineEdit select dropdown is empty HOT 3
- Empty subGrid & empty detail in Master-detail grid HOT 1
- ColumnConfig.jqGrid.searchoptions.sopt cannot be overwriten (jqgrid) HOT 1
- Upgrade to grails v3? HOT 14
- required column property in GSP
- Question regarding column format and filters
- Filtering not working with Grails 2.2.5
- Inline Edit and Add
- Using Enum in columns
- export from list datasource
- Date filter not working 1.7.1
- EasyGrid internacionalization
- Has Tudor stopped supporting easygrid? HOT 2
- dynamicProperties
- How can I add a class to filter input field?
- Grails, Cannot get property 'DAutNaoProcessados' on null object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easygrid.