I have to code a gui like this:
It's an homepage with a left menu and a changing right part, on button1 click form1 must be displayed, on button2 click form2 a so on. Each form has its own button "ok" that would call a controller function which will save data entered by the user in a database (but it is not relevant).
My question is: I know that according to MVC pattern user button click should call a controller function, so what would the controller do on button1 click? There are 2 scenarios in my mind:
1) Controller create the form1 and then pass it to the homepage view which will just show it on the right.
2) Controller just call the appropriate method of the Homepage view which will create form1 and will show it.
EDIT: What i would know is: is it a job of the controller to create each view corresponding to the form and then pass it to the homepage view, or it just call a method of the homepage view which will create and display it?