This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multi Select Drop Down  RSS feed

 
BuccaneerAnirban Bhattacharjee
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people,
can some one help me , how can i Create Dropdown with multiple selection in struts. How can I retireve all the selected values in my form bean.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Specify multiple="true" with the <html:select> tag. Then Make sure the property refers to an array. The array should generally be String[], but it could also be int[]. Example:



Then in your JSP:
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!