Question

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?

Was it helpful?

Solution

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

Here is an example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top