previous | start | next

## Example: Using a `Map` to Describe a List of Choices

- To create the list of choices:

      public class CreditCardBean
      {
         . . .
         public Map<String, Integer> getMonthChoices()
         {
            Map<String, Integer> choices = new LinkedHashMap<String, Integer>();
            choices.put("January", 1);
            choices.put("February", 2);
            . . .
            return choices;
         }
      }

- The type of the value property of the component must match the type of the map value
  - For example, `creditCard.expirationMonth` must be an integer
- If multiple selections are allowed, the type of the value property must be a list or array of matching types

previous | start | next