add a custom editor to the binder then i got it work
(1)
public class BindingInitializer implements WebBindingInitializer {
        @Override
        public void initBinder(WebDataBinder binder, WebRequest request) {
                SimpleDateFormat dateFormat = new 
SimpleDateFormat("yyyy-MM-dd");
                binder.registerCustomEditor(Date.class, new CustomDateEditor
(dateFormat, true));
                binder.registerCustomEditor(Integer.class, new 
CustomNumberEditor
(Integer.class, true));
                binder.registerCustomEditor(Double.class, new CustomNumberEditor
(Double.class, true));
                binder.registerCustomEditor(Float.class, new CustomNumberEditor
(Float.class, true));
                binder.registerCustomEditor(String.class, new CharacterEditor
(true));
        }

}

(2) and the dispatcher-servlet,xml
<!-- annotationMethodHandlerAdapter -->
<bean id="annotationMethodHandlerAdapter"
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
    <property name="webBindingInitializer">
        <bean class="gaej.test.BindingInitializer" />
    </property>
</bean>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to