1. #1
    Sencha User stat30fbliss's Avatar
    Join Date
    Jun 2011
    Location
    Chicago, IL
    Posts
    4
    Vote Rating
    0
    stat30fbliss is on a distinguished road

      0  

    Default Answered: Working with MVC

    Answered: Working with MVC


    Hey there,

    I have finished the getting started App in the docs built with MVC. I have everything up and running great so I would like to take the demo app to the next level, and start customizing it to my needs.

    I am looking into different components and layout types, and am curious how I go about entering my new xtypes into my Views when working with MVC.

    My current Home view looks like this:

    Code:
    Ext.define('GS.view.Home', {
        extend: 'Ext.Panel',
        xtype: 'homepanel',
    
    
        config: {
            title: 'Home',
            iconCls: 'home',
            cls: 'home',
            scrollable: true,
            styleHtmlContent: true,
    
    
            html: [
                '<img src="http://staging.sencha.com/img/sencha.png" />',
                '<h1>Welcome to Sencha Touch</h1>',
                "<p>You're creating the Getting Started app. This demonstrates how ",
                "to use tabs, lists and forms to create a simple app</p>",
                '<h2>Sencha Touch (2.0.0)</h2>'
            ].join("")
        }
    });
    Now my question being, can I insert addition items [] within the config {} portion of the view, or do I need to add them elsewhere? Would I define those xtypes and their parameters inside the items[] string?

    I am looking to add in a different layout and just start placing a bunch of buttons with actions inside the homeview so I can start to get comfortable working with the components and layouts.

    I'm a noob, so be gentle

    Cheers!

  2. To add items to a parent then yes you can use the items config within the config object.

    Code:
    config : {
    ....
        items : [
            {
                xtype : 'button',
                text : 'Foo'
            }
        ]
    }

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Answers
    3462
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    To add items to a parent then yes you can use the items config within the config object.

    Code:
    config : {
    ....
        items : [
            {
                xtype : 'button',
                text : 'Foo'
            }
        ]
    }
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User stat30fbliss's Avatar
    Join Date
    Jun 2011
    Location
    Chicago, IL
    Posts
    4
    Vote Rating
    0
    stat30fbliss is on a distinguished road

      0  

    Default


    Thanks for the response!

    I kept trying the model in the docs without success, until I realized I was missing a comma...

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