I have an exjs (4.2) app, and I have a modal window with some arguments. I want to divide the argument by several controllers, for example, I have a controller, where I had added control to the closest window and so on, and inside this window I have another example, for example, saving some form And with your buttons to edit And I want to add new controller for the form, but I do not know whether it is good or bad? And when I need a controller for the form?
Thank you.
abstract application
modal window (pass button and some other controls) - item box - item (has self control) for modal window This controller item is Xtype Which is dynamically added
I have two controllers, one for a modal window (parent) and one item (child). And I do not know how to improve parents from the other controller.
It's a good practice to add controller for each view of your project (MVVM) What I like to do Is adding a controller with the global controller, which I should work for every scene, so in this case you can use the Mixes:
Ext.define (' MyApp.view. MyPanel.MyPanelViewController ', expand:' Ext.app.ViewController ', nickname:' ControllerManal ', Mixes: {Global Co. Rolr: 'MyApp.controller.GlobalController'}, control: {...} ...});
In this way you can use all the methods of your global controller inside your ViewController.
Comments
Post a Comment