Communication between two MVC's
Hi.
I want a communication between two MVC's, offcourse in one project.
What I have:
MainWindowView (MVC)
|
+--> MenuView (MVC)
In my Menu MVC there is a button Logout. When this one is pressed the model had to tell the MainWIndowView that he can close.
How can I do this?
Statix.
[341 byte] By [
Statixa] at [2007-10-1 19:48:32]

I have a solution... but I don't know if this is a neat one..
This is my MenuModel:
...
case 3:
MainWindowController.closeMainWindow();
LoginModel loginModel = new LoginModel();
LoginController loginController = new LoginController(loginModel);
break;
}
...
This one communicates directly with a public static void closeMainWindow () method which disposes the view (JFrame)
public static void closeMainWindow (){
mvcView.dispose();
}
Is this a solution so I stick to the MVC pattern? I hope so... I wouldn't know another way...
Thanks in advance!