效果:
[img]http://dl.iteye.com/upload/attachment/454418/6e16529b-9a61-3f9a-9036-0161a42957aa.png[/img]
[list]
[*] string
无需转换
[*] string inList
{fieldLabel: '${cgDomainProperties.string2.chinese}',name: 'string2',xtype: 'combo',store: new Ext.data.SimpleStore({ fields:['values'], data:[['选择1'],['选择2'],['选择3']]}), emptyText:'请选择${cgDomainProperties.string2.chinese}',mode: 'local', triggerAction: 'all', valueField: 'values', displayField: 'values'},
[*] Date
Form:{fieldLabel: '${cgDomainProperties.date1.chinese}',name: 'date1',xtype:'datefield',format:'Y-m-d'},
Controller: book.date1=(new java.text.SimpleDateFormat("yyyy-MM-dd")).parse(params.date1)
同时将:Config.groovy中添加[color=red]grails.converters.json.date= 'javascript'[/color]
[*] int
Form:{fieldLabel: '${cgDomainProperties.ingeger1.chinese}',name: 'ingeger1',xtype:'numberfield'},
Controller: book.ingeger1=params.ingeger1.toInteger()
[*] float
Form:{fieldLabel: '${cgDomainProperties.float1.chinese}',name: 'float1',xtype:'numberfield',allowDecimals:true},
Controller: book.float1=params.float1.toFloat()
[*] boolean
Form: {boxLabel: '${cgDomainProperties.boolean1.chinese}',name: 'boolean1',xtype:'checkbox'}
book.boolean1=params.boolean1?true:false
[/list]
[img]http://dl.iteye.com/upload/attachment/454418/6e16529b-9a61-3f9a-9036-0161a42957aa.png[/img]
[list]
[*] string
无需转换
[*] string inList
{fieldLabel: '${cgDomainProperties.string2.chinese}',name: 'string2',xtype: 'combo',store: new Ext.data.SimpleStore({ fields:['values'], data:[['选择1'],['选择2'],['选择3']]}), emptyText:'请选择${cgDomainProperties.string2.chinese}',mode: 'local', triggerAction: 'all', valueField: 'values', displayField: 'values'},
[*] Date
Form:{fieldLabel: '${cgDomainProperties.date1.chinese}',name: 'date1',xtype:'datefield',format:'Y-m-d'},
Controller: book.date1=(new java.text.SimpleDateFormat("yyyy-MM-dd")).parse(params.date1)
同时将:Config.groovy中添加[color=red]grails.converters.json.date= 'javascript'[/color]
[*] int
Form:{fieldLabel: '${cgDomainProperties.ingeger1.chinese}',name: 'ingeger1',xtype:'numberfield'},
Controller: book.ingeger1=params.ingeger1.toInteger()
[*] float
Form:{fieldLabel: '${cgDomainProperties.float1.chinese}',name: 'float1',xtype:'numberfield',allowDecimals:true},
Controller: book.float1=params.float1.toFloat()
[*] boolean
Form: {boxLabel: '${cgDomainProperties.boolean1.chinese}',name: 'boolean1',xtype:'checkbox'}
book.boolean1=params.boolean1?true:false
[/list]