List of usage examples for org.springframework.web.bind ServletRequestDataBinder setConversionService
public void setConversionService(@Nullable ConversionService conversionService)
From source file:org.bibsonomy.webapp.util.spring.controller.MinimalisticControllerSpringWrapper.java
@Override protected void initBinder(final HttpServletRequest request, final ServletRequestDataBinder binder) throws Exception { super.initBinder(request, binder); /*/* www. j a v a2s . co m*/ * set convertion service (string => enum, string => class) */ binder.setConversionService(this.conversionService); /* * Register a custom date editor to support binding of date fields. * * FIXME: This is a HACK to allow the DBLP update to set the date of * (bookmark) posts. The problem is, that the date format is now fixed * for ALL our controllers, since we can't override this initBinder * method (since we're using this MinimalisticController ... wrapper) * */ binder.registerCustomEditor(Date.class, new CustomDateEditor(DATE_FORMAT, true)); /* * setting the dis/allowed fields for the binder */ binder.setAllowedFields(allowedFields); binder.setDisallowedFields(disallowedFields); }