开发者

about java spring mvc framework

what is the use of formbacking object and initbinder of spring frame开发者_Python百科work.


Perhaps this will help you: Spring MVC, generating a form backing object from a request?


In the formbacking (often uses in Spring 2.x SimpleFormController) is used to provide an object, that is filled with the data from the http request.

This was/is needed if the Command object is to complex to be created only out of the information from the request.

For example if the Command object has not public default constructor, or contains sub elements only specified by there interface (so it is impossible to create a concrete object for them automatically)


InitBinder lets you define your own editors and validators for your backing object. For example you can convert different value.

For more information: go here section 15.3.2.12 Customizing WebDataBinder initialization

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜