I am developing a project in a MVC architecture. It should be a simple application to manage some customers.
There are MainModel, MainView and MainController classes which make the main window to show the content of the customers tables and to let the user insert, remove or edit customers.
My problem is that the insert and edit buttons should show some dialog windows to let the user insert and edit some text values and I have some doubts.
I would like to ask you some questions:
- Should I use the MVC architecture for each dialog window?
If yes, I have tried doing it but my dialog windows are modal, so my code runs the model, runs the view but it gets blocked in the view and it doesn't run the controller class. How could I solve it?
For example here it gets blocked in the "new InsertCustomerController..." instruction:
CustomerModel customerModel = new CustomerModel(); InsertCustomerView insertCustomerView = new insertCustomerView(customerModel); new InsertCustomerController(insertCustomerView, customerModel);
Thank you very much.