Threaded View

  1. #1
    Sencha User cyberwombat's Avatar
    Join Date
    Oct 2011
    Posts
    237
    Vote Rating
    2
    Answers
    6
    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.

Thread Participants: 1