Still not working, I'm afraid. Any other idea?

On Apr 12, 7:23 am, Elvea <[email protected]> wrote:
> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to