I have a rather complex class that has three one-to-many relationships and two many-to-many relationships with other classes. I would like to make it possible for the user to fill in all the details one after another - in one step or even better in a few steps (wizard).
My class is called PeriodicTask - the user must select one server object (which represents an instance of SQL Server), and depending on the choice, I need to provide the user with the opportunity to choose which databases he wants to use (the best option is to use the checkboxes). I do not know how to achieve this.
I would start by creating an action that returns JSON with the databases for the selected server. It will be called by jQuery. So far so good, but what then to do?
Should I add <input type="checkbox">to the form for each database or create another form and post some other action? How to parse this when the form is submitted? Can I break it down into smaller steps? HTTP is stateless, so I somehow need to transfer or remember the previously submitted data - how?
PS> I use the Entity Framework here, so part of the class hierarchy looks like this:

source
share