Announcement Announcement Module
Collapse
No announcement yet.
list box and multiple selections Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • list box and multiple selections

    I've a requirement where in user needs to select multiple items from a drop-down/list box and the back-end will process those selections.

    Currently i'm displaying a select box and it allows only one selection.

    How can i change this to meet the above requirement.

    Please help.

  • #2
    Use the form:select tag and set its path attribute to a list:

    Code:
    <form:select path="countries" items="${countryList}"/>
    The items attribute points to a list containing all countries, while the path points to a list on the command object containing currently selected ones.

    You'll most likely want to specify what to use for the option value/label:

    Code:
    <form:select path="countries" items="${countryList}" 
        itemValue="code" itemLabel="name" />

    Comment


    • #3
      Thanks Rossen. I will try implementing it.

      Comment

      Working...
      X