-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExtjsGrid.vm
37 lines (37 loc) · 987 Bytes
/
ExtjsGrid.vm
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
#checkId($entity)
Ext.define('${PROJECT_NAME}.view.grid.gen.${entity.name}Gen', {
extend: '${PROJECT_NAME}.view.grid.base.BaseGrid',
requires: ['${PROJECT_NAME}.store.${entity.name}'],
title: '${entity.name}s',
columns: [
#foreach( $attribute in $entity.nonKeyAttributes )
{
text: '${attribute.label}',
dataIndex: '${attribute.name}',
editor: 'textfield'
},
#end
#if(${entity.keyAttributesCount} == 1)
{
dataIndex: '${entity.keyAttribute.name}',
text: 'id'
}
#else
{
dataIndex: 'id${entity.name}',
text: 'id'
}
#foreach($field in ${entity.keyAttributes})
,
{
dataIndex: '${field.name}',
text: 'id${field.name}'
}
#end
#end
],
store: {
type: '${fn.toLowerCase(${entity.name})}'
}
});
## https://stackoverflow.com/questions/32315463/extjs-add-item-to-extended-class