Threaded View

  1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    143
    Answers
    5
    Vote Rating
    0
    rockinthesixstring is on a distinguished road

      0  

    Default Answered: Stuck trying to load a view

    Answered: Stuck trying to load a view


    I'm trying my hand at ST2 and I'm stuck on the most basic of bits. I'm simply trying to load a View and I'm not sure how.

    index.js
    Code:
    Ext.application({    name: 'rpc',
        defaultUrl: 'home/index',
        controllers: ['home'], //note: define controllers here
        launch: function () {
            console.log('Ext.application ~ launch'),
            Ext.create('Ext.TabPanel', {
                id: 'rpc-rootPanel',
                fullscreen: true,
                tabBarPosition: 'bottom',
                items: [{
                    title: 'Home',
                    iconCls: 'home'
                }]
            });
        }
    });
    home controller
    Code:
    Ext.define('rpc.controller.home', {    extend: 'Ext.app.Controller',
        views: ['home.index'],
        init: function () {
            console.log('rpc.controller.home ~ init');
        }
    });
    home/index view
    Code:
    Ext.define('rpc.view.home.index', {    extend: 'Ext.Panel',
        id: 'rpc-view-home-index',
        title: 'Home',
        layout: {
            type: 'vbox',
            align: 'stretch'
        },
        defaults: { style: 'margin-bottom: 5px' },
        config: {
            fullscreen: true,
            items: [{
                xtype: 'button',
                text: 'Videos',
                handler: function () {
                    Ext.redirect('video.index');
                }
            }],
            html:'test'
        }
    });

  2. I would suggest reading the following articles:

    http://www.sencha.com/learn/architec...xt-js-4-part-1
    http://www.sencha.com/learn/architec...xt-js-4-part-2
    http://www.sencha.com/learn/architec...xt-js-4-part-3

    The only difference between ExtJS 4 and ST2 is that in ST2 you have to define the view configuration inside of the config: {} object. Other then that those articles apply directly to ST2.

Thread Participants: 1

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