forked from tudor-malene/Easygrid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColumnConfig.groovy
More file actions
37 lines (26 loc) · 1.27 KB
/
ColumnConfig.groovy
File metadata and controls
37 lines (26 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package org.grails.plugin.easygrid
import groovy.transform.Canonical
/**
* defines a grid column
*
* @author <a href='mailto:tudor.malene@gmail.com'>Tudor Malene</a>
*/
@Canonical
class ColumnConfig extends FilterableConfig{
// String name // the name of the column - used for accessing the column in th grid or for other configurations ( like property or label)
String label // the label that represents the header of the column
String type // represents one of the predefined column types ( sets of configurations )
// the value - how to determine the value for each cell
String property // if the elements are maps or domain classes -this represents the property
Closure value // if the value is more complex ( like a sum , or etc ) then this closure can be used
// formatting of the value - for the display
String formatName // when you want to use one of the predefined formatters
Closure formatter // a custom closure
Boolean sortable // flag to enable sortable
String sortProperty
Closure sortClosure
Boolean showInSelection // if selection is enabled for the grid - this flag decides if this column will be shown in the dialog
// Map view //will contain the view properties
ColumnConfig() {
}
}