View Full Version : Using Ext.MessageBox with MVC

Michael Waters
1 Apr 2014, 7:02 AM
I have several controllers from where I need to display a warning message e.g. "Are you sure you want to save updates..." with yes & no buttons. This general warning message will be used by several controllers at various save points.
How is the best way to go about having the Message Box defined in 1 place and be available for all controllers to display the message box. I have tried to define a MyMessageBox view extending messagebox, but haven't been able to get this working...
Any help would be much appreciated

Michael Waters
1 Apr 2014, 9:17 AM
Just to be clear on my question I'm not trying to change the functionality of the MessageBox, I just want the MessageBox to be available in multiple places

Michael Waters
2 Apr 2014, 6:46 AM
Can anyone give some help with this issue, I want to hold all error messages in 1 location and display the errors from several different controllers. Surely others have done similar before?

3 Apr 2014, 6:20 AM
I guess you could create a singleton class that has a error function that can be called from any controller. Just add the requires to your app.js
and call the function as needed.