Announcement Announcement Module
Collapse
No announcement yet.
Spring MVC binding. Need help. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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="department.name"/>
    <form:input path="department.description"/>

    So when I submit with empty department.name and department.description the Spring auto-instantiate object Department with empty properties. (See https://jira.springframework.org/browse/SPR-6032 I would keep autoGrowNestedPaths=true)

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