Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Grails 将PropertyEditor与特定控制器关联_Grails_Propertyeditor - Fatal编程技术网

Grails 将PropertyEditor与特定控制器关联

Grails 将PropertyEditor与特定控制器关联,grails,propertyeditor,Grails,Propertyeditor,是否有方法将PropertyEditor与特定控制器关联 我可能希望DateTime类有两个PropertyEditor,并希望将它们关联到不同的控制器 或者一个有2个日期字段的域类,一个需要将2010-12-23更改为最新,另一个需要2010-12-23 10:00:01无法与控制器关联PropertyEditorRegistrar对于registerCustomEditor(),只有两个签名:用于整个属性类和属性名称。 第二个签名在Grails1.3.6之前不起作用,这是一个bug。 所以

是否有方法将PropertyEditor与特定控制器关联

我可能希望DateTime类有两个PropertyEditor,并希望将它们关联到不同的控制器


或者一个有2个日期字段的域类,一个需要将2010-12-23更改为最新,另一个需要2010-12-23 10:00:01

无法与控制器关联
PropertyEditorRegistrar
对于
registerCustomEditor()
,只有两个签名:用于整个属性类和属性名称。 第二个签名在Grails1.3.6之前不起作用,这是一个bug。 所以


将自Grails1.3.6起运行。

无法与控制器关联
PropertyEditorRegistrar
对于
registerCustomEditor()
,只有两个签名:用于整个属性类和属性名称。 第二个签名在Grails1.3.6之前不起作用,这是一个bug。 所以

将从Grails1.3.6开始工作

registry.registerCustomEditor(Date.class, 'startDate', new MyDateAddressEditor())