Wednesday, March 31, 2010

Spring MVC(2) Property Editor

From http://www.shaunabram.com/data-binding-in-spring-mvc/
Spring MVC allows the use of command objects (aka form backing objects, model attributes, domain model objects – basically the objects used to transport data between your view and your controller) using just about any type. However, the Servlet API deals with form parameters as Strings. Spring uses a technique called data binding to covert between the String representation and the real underlying type. This enables user input to be bound to the objects you use to process user input. In other words, the values entered by a user in a form can be used to set the property values on a chosen object.

No comments:

Post a Comment