Pregunta

My APP will send a String time parameter to background, like "13/03/2014", if I used TimeStamp in form bean, My ajax request will raise a 400 error, if I used String in form bean, the request will raise smoothly, but I should convert this parameter into TimeStamp, it is not good I think, So I want to know if there is a converter or configuration for such situation?

¿Fue útil?

Solución

Yes, you should use WebDataBinder.registerCustomEditor method within @InitBinder method.

Here is an example.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top