Hybrid View

  1. #1
    Sencha User cyberwombat's Avatar
    Join Date
    Oct 2011
    Posts
    237
    Answers
    6
    Vote Rating
    2
    cyberwombat is on a distinguished road

      0  

    Default Answered: PR3 change in container getData?

    Answered: PR3 change in container getData?


    Hi. Excited to use PR3 - however my app stopped working in some areas.

    I have a controller that calls a new view:

    Code:
    getNewView: function() {
    
    ..stuff to get data
     b.loadRecords(a);
    var a = b.getAt(0);
    console.log(a.getData());  <-- this shows correct data
    
    //then pass the data to 
    return this.getView("Dashboard").create({
                title: "Dashboard",
                data: a.getData()
            })
    I used to be able to access this data in my view in PR2 but no more - now it shows as undefined
    Code:
    Ext.define("SquareRoute.view.Dashboard", {
        extend: "Ext.Container",
        xtype: 'dashboard',
    
    
        record: undefined,
        initialize: function() {
    
    
            var a = this.getData();
              console.log(a); <-- empty/undefined
    I looked at changelog/docs but I don't see anything related to this.

  2. You must call this.callParent() if you override initialize. Put it before your getData() call and it will work.

  3. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    You must call this.callParent() if you override initialize. Put it before your getData() call and it will work.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  4. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Just to include why: initialize in component now sets up the configurations. So obviously if you override that method and don't call the parent, the configuration system will not be setup for that class, leaving configurations not working.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

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