Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MultiActionController show form data in JSP

 
Anoop Nair
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All.

I am using a spring MultiActionController. I have a command object which has a map in it. I want to populate a drop-down using this.

Below is what i am doing:

Controller


UserForm


JSP


In the JSP, the select box is coming empty. I have verified that the map does contain values.

Do I need to do anything more ??
 
Anoop Nair
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it resolved.

The select tag should be

<form:select path="userId" items="${userForm.users}" />

instead of

<form:select path="userId" items="${users}" />

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic