Announcement Announcement Module
No announcement yet.
Spring MVC binding. Need help. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring MVC binding. Need help.

    I have the following command object:

    public class User {
    private Department department;
    private String firstName;
    private String lastName;
    private String login;
    private String password;

    which should be rendered at jsp page:

    <form:input path="lastName" />
    <form:input path=""/>
    <form:input path="department.description"/>

    So when I submit with empty and department.description the Spring auto-instantiate object Department with empty properties. (See I would keep autoGrowNestedPaths=true)

    What is need to do for getting back User object where Department object=null?