title: Spring MVC : Mapping Form input to complex backing object containing HashMap
body: <p>I have scenario where a list of input fields from the jsp form would map to a HashMap field within the backing object Resolution. </p>
  
  <pre><code>    @Controller
      @RequestMapping("/rms") 
      class ResolutionManagementController{
  
          private static final String ISSUE_FORM_PATH="/view/resolutionForm";
          private static final String SHOW_RESOLUTION_PATH="/view/showResolution";
  
          @Autowired
          IIssueManagementService issueService;
  
          @Autowired
          ResolutionManagementService resolutionService;
  
          @RequestMapping(value="/resolution/form",method=RequestMethod.GET)
          String resolutionForm(Model model){
                  List&lt;Issue&gt; issues = issueService.listIssue();
                  model.addAttribute("issues",issues);
                  model.addAttribute("resolution", new Resolution());
                  return ISSUE_FORM_PATH;     
          }
  
          @RequestMapping(value="/resolution",method=RequestMethod.POST)
          String resolve(Resolution resolution,Model model){
              List&lt;SupportExecutive&gt; executives = resolutionService.addResolution(resolution);
              model.addAttribute("executives",executives);
              return SHOW_RESOLUTION_PATH;
          }   
  
      }
  </code></pre>
  
  <p>Backing Form Object</p>
  
  <pre><code>class Resolution{
          private String resolutionId;
          private String categoryId;
          private Map&lt;Issue,SupportExecutive&gt; allotments;
  
          //getters and setters
  
      } 
  </code></pre>
  
  <p>resolutionForm.jsp</p>
  
  <pre><code>&lt;form:form action="/rms/resolution" commandName="resolution"&gt;
  
          &lt;c:forEach var="issue" items="${issues}"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      ${issue.issueTitle}
                  &lt;/td&gt;
                  &lt;td&gt;
  &lt;!-- What should i do so that issueTitle is converted
  to Issue Object and stored as map key in allotments Map in resolution 
  object and the value entered by the user is converted to SupportExecutive 
  object and stored as corresponding value object of the allotments map--&gt;
                      &lt;input type="text" name="${issue.issueTitle}&gt;"
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/c:forEach&gt;
  
  
      &lt;/form:form&gt;
  </code></pre>
  
  <p>I tried to take a look at property editors but i am unable to understand how would i obtain the key and value and store in the map using property editor. Or may be they are not suited here. </p>
  
  <p>What is the most cleanest way of achieving this ? It would be good if a detail explanation involving steps can be provided.</p>