Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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

 
Ranch Hand
Posts: 205
  • 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.




 
Joel Salatin has signs on his property that say "Trespassers will be Impressed!" Impressive tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic