I am using Spring Web MVC without Velocity templates (templates without JSP). To answer your question, you need to understand how Spring performs data binding. Basically, all this is in the name that you give to your input elements. for instance
<input name="properytOne" value="1" type="hidden"> <input name="properytTwo" value="2" type="hidden"> <input name="rich.property3" value="3" type="hidden">
will bind values ββto an object like this
class CommandOne { private String propertyOne; private String popertyTwo; private CommandTwo rich;
You must also be sure to instantiate the command object, but this will be handled in your SimpleFormController.
source share