function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chuckwalleychuckwalley 

Dynamic picklist within a list

I'm using a shopping cart scenario to pick products. When a product is selected, it is moved into a shopping cart list. Each product has different options (ie "Size," Zone.") depending upon the product. When I select the product and pull into the shopping cart, I want to provide a dynamic dropdown showing only the sizes and zones for the specific product. 

 

Now, when I do this, if I pick two products, then I get all options for both products appearing in the picklists. I know I'm loading into one whole array, so I'm thinking I should create a list<list<SelectOption>> for each option, but I'm not sure how to keep it in sync on the VF page. That is, when I'm showing the first product, how do I convey I want to show the first list<SelectOption>? 

 

Or - and I completely off base and should I submit a job application at McDonalds?