开发者

some form fields are cleared on bindAndValidate() after formbackingobject() populate them correctly, Spring MVC

开发者 https://www.devze.com 2023-02-28 02:09 出处:网络
I m working on some existing code where the controller overrides the formbackingobject method. the object returned from the formbackingobject is populated correctly, but when it reaches the jsp some

I m working on some existing code where the controller overrides the formbackingobject method.

the object returned from the formbackingobject is populated correctly, but when it reaches the jsp some fields are being blank. I did some debugging and I found that some of the fields data is cleared in the BaseCommandController class, in the bindAndValidate method, and specifically in the line binder.bind(request); i m not able to find any validator where this data would be changed.

开发者_开发百科

Any idea how those fields get cleared and why it that method.


The validators shouldn't be the ones changed your object. Your object would have values associate with the values in the request parameters after binding step.

0

精彩评论

暂无评论...
验证码 换一张
取 消