PDA

View Full Version : three applications at the same workspaces that share some common modules



sekaijin
26 Nov 2013, 4:25 AM
Hello,
I try to make a ExtJS MVC application with multiple modules.

/***************/
I created a workspace.
I generated an application MyApp
I wanted to create one package per module of my application
so I created a package MyModule
I placed therein controllres, views, stores, and models.

I added my module to my application. in the TabPanel on the MainView in my application I placed the views of my module (xtypes)

at startup when creating the first view I have an exception.
after debugging it turns out that the datastore yet declared in the view and the controller is not loaded. me.store is undefined in initComponant
Ext.data.StoreManager.lookup (me.store | | 'ext-empty-store') returns undefined

I tested without using "Sencha build app" to see if the sources of stores and controllers were loaded. none of store, model, controllers files of my package is loaded by the class loader.

/***************/
I completely changed the organization of my application

I did not create a workspace
I generated my application
I created a package for my module directly in my application.
I put the stores, controllers, models and views in the module

and I used my module in my application
and this time everything works.

/***************/
I wanted to create three applications at the same workspaces that share some common modules.
I do not know how.

thank you for your help.

sekaijin
27 Nov 2013, 1:06 AM
I found the problem.

in the Application file (extends Ext.app.Application)
we must put the full name of Controlers

     controllers: [
         'Main'
         'Transco.controller.CentreCout'
         'Transco.controller.CodeLieu'
         'Transco.controller.Application'
         'Transco.controller.Route'
     ]

Gary Schlosberg
27 Nov 2013, 6:29 AM
Glad you figured it out, and thanks for sharing your solution with the community.