• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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.




 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic