forked from tudor-malene/Easygrid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEasygrid.groovy
32 lines (30 loc) · 1.06 KB
/
Easygrid.groovy
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
package org.grails.plugin.easygrid
import java.lang.annotation.*
/**
* Annotation for Controllers at the class level.
* It specifies that this controller might contain definitions of grids.
*
*
* The grids can be defined in multiple ways:
* - a static field named "grids" with the definitions of the grids
* - the grids defined in the class specified in 'externalGrids'
* - a closure ending with 'Grid'
*
*
* The Controller will be injected with multiple methods for each Grid, depending on the configuration
* ${gridName}Rows () - will return the actual rows
* ${gridName}Export () - export
* ${gridName}InlineEdit () - will be called on submitting the inline form
*
* @author <a href='mailto:[email protected]'>Tudor Malene</a>
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@interface Easygrid {
/**
* a class that must have a static grids field containing definitions of grids that will be served by the current controller
* @return
*/
Class externalGrids() default Object.class
}