• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring MVC : Mapping Multiple form:input values to a generic HashMap in form backing object

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scenario : This is a customer support application and the scenario in question is Issue Resolution Scenario. Support Manager clicks a certain link which shows list of issues to be resolved. Corresponding to each issue is an input field where the Support Manager can add the name of a Support Executive and submits the form. This UI form is rendered from issueResolution.jsp .



Backing Form Object : Resolution.java



issueResolution.jsp



If you see the issueResolution.jsp, the form would have multiple input tags. I expect the value of name attribute to form the Key in the allotments map in the backing object and the data entered by the user to be binded to corresponding value in the allotments map in the backing object (i.e. Resolution object).

Since this is not a straight forward conversion. Using Property Editors and WebDataBinders is one way i would like to explore. But in this scenario it seems a little complicated. I am open to all ways except MessageConverters as of now.




reply
    Bookmark Topic Watch Topic
  • New Topic