In this challenge we want to build a Visualforce component which creates a grouped single-select picklist. See the example below:
In this situation, the bold items are the group names (NFC East, NFC North).
The values in the map should be dictated by a map which will be passed to the component. This map will include:
- id - A SFDC id
- displayValue - string
- groupName - string
You must group the values when displaying based on the group name. The displayValue will be the value rendered in the picklist, and id will be the value is passed back to the controller when a selection is made.
In the example above, the map would look like this:
|2||New York Giants||NFC East|
|3||Philadelphia Eagles||NFC East|
|4||Washington Redskins||NFC East|
You must use Chosen to power the picklist: http://harvesthq.github.io/chosen/