1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    1
    Vote Rating
    0
    ALWA is on a distinguished road

      0  

    Default Unanswered: Adding controller, model; store and view dynamically

    Unanswered: Adding controller, model; store and view dynamically


    Is it possible to dynamically load a "self MVC" component:


    Code:
    /* Tree Hierarchy:
     *
     * app/
     *   controller/
     *    menu/
     *      MainMenu.js
     *   model/
     *    menu/
     *      MainMenu.js
     *   store/
     *    menu/
     *      MainMenu.js
     *   view/
     *    menu/
     *      MainMenu.js
     * core/
     *   PluginManager.js
     * app.js
     * index.html
    
    
    /* In app.js */
    
    
    ALWA = Ext.create('ALWA.App', {
        enableDebug: true,
        name: 'ALWA',
        controllers: [],
        models: [],
        stores: [],
        views: [],
    
    
    /*
     * start application
     */
        launch: function() { }
    
    
    });
    
    
    /* In PluginManager.js */
    
    
    ...
        
        var menu = 'menu.MainMenu';
        ALWA.app.controllers.push('ALWA.controller.' + menu);
        ALWA.app.models.push('ALWA.model.' + menu);
        ALWA.app.stores.push('ALWA.store.' + menu);
        ALWA.app.views.push('ALWA.view.' + menu);
    
    
        var controller = ALWA.app.getController('ALWA.controller.' + menu);
    
    
        /* This does not work.
         * It says 'no init function defined'
         */
        Ext.each(ALWA.app.controllers, function(c, i) {
            c.init();
        });
    
    
        /* I want to create the view dynamically with all the associated:
            controller,
            model,
            store
            view */
    
    
    
    
        /* Please HELP */

  2. #2
    Sencha User Olivierco's Avatar
    Join Date
    Nov 2011
    Location
    Paris - France
    Posts
    65
    Answers
    3
    Vote Rating
    -1
    Olivierco is an unknown quantity at this point

      0  

    Default


    Someone can help us about this bug?

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi