spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.5k stars 38.1k forks source link

Binders are not called after spring web mvc upgrade from version 3.0 to 3.2.2 [SPR-11286] #15910

Closed spring-projects-issues closed 5 years ago

spring-projects-issues commented 10 years ago

hari krishna galla opened SPR-11286 and commented

Our product uses spring web mvc 3.0 before and we recently upgraded to 3.2.2 version. After upgradation the binders (custom editors) stopped working. All our controller either extends SimpleFormController or AbstractFormController and we register our binders in the initbinder method like the following

protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { binder.registerCustomEditor(AppDef.class, new AppDefPropertyEditor (configManager)); }

Problem: if user request has app def id then spring is calling binders to convert to AppDef object and this object is properly set to the command object. But while sending the response back to the browser then getAsText() of the registered custom editor is not being called by the framework. Hence the selected app def id is not going back and user loosing the selection.

This code was working with the old version of spirng before. Is there anything we are missing here in the new version?


Affects: 3.2.2

spring-projects-issues commented 5 years ago

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.