There is a form: "dropdownlist", "available items listbox" and "selected items listbox", button: Add.
"dropdownlist" is filled with values. OnDropdownChange "available items listbox" is populated with the values taken from db (ajax request). User, using Add button, moves elements from "available items listbox" to "selected items listbox".
Once, user is done with the first selection, he wants to select another item in "dropdownlist". OnDropdownChange clears previously populated listboxes, and user continues selection like in the first step.
At the end, from user perspective, selection he made was like:
dropdown_value1 has several items associated with it in the first step.
dropdown_value2 has several items associated with it in the second step.
...
dropdown_valueN has several items associated with it in the last step.
Once user is done with selection, he clicks "Submit" button, form is posted to the server.
The very last users selection FormModel is very easy and straightforward to implement: selected value of "dropdownlist" and selected items in "selected items listbox".
BUT: Questions are: Where and how to store intermediate selections, like dropdown_value1 with its corresponding selected values, dropdown_value2 with its corresponding values, etc.? How to implement FormModel, that on post will contain all selections made by user?
Hope, to hear at least an idea. I think about some sort of js object, like string, list and list of such objects... A little bit lost at this point.
Any help/idea is much appreciated.