In Grails you just add a PropertyEditorRegistrar to your resources.xml
or resources.groovy you don't need the CustomEditorCOnfigurer
Cheers
On Sun, Nov 8, 2009 at 8:31 AM, Eric Liu <
todayeric@...> wrote:
> Dear all,
> i have a geometry class named :Point , and a PropertyEditor
> PointEditor.
> and i try write config file : resources.xml in config/spring directory:
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="
http://www.springframework.org/schema/beans"
> xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="
http://www.springframework.org/schema/beans>
>
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
> <bean id="customEditorConfigurer"
> class="org.springframework.beans.factory.config.CustomEditorConfigurer">
> <property name="customEditors">
> <map>
> <entry key="my.Point" value="my.PointEditor"/>
> </map>
> </property>
> </bean>
> </beans>
> so when grails is running, i test in bootstrap.groovy , it can find the
> right editor for Point class.
> But when i use Point as property in a domain class , and generate
> controllors, use controllor's save method,it can't find the editor, is data
> binding something need config?
> thanks!
>
>
--
Graeme Rocher
Head of Grails Development
SpringSource - A Division of VMware
http://www.springsource.com---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email