Results 1 to 3 of 3

Thread: Unable to get value of the property 'heightModel': In IE 8 and under.

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Answers
    1
    Vote Rating
    0
      0  

    Default Unable to get value of the property 'heightModel': In IE 8 and under.

    There is a problem when rendering the layout of type hbox or vbox when I sandwich a panel with two grids (grid-panel-grid). This problem appears to only affect IE 8 and under.

    So here's the problem...

    I have a page with multiple hbox type layout containing grid-panel-grid items. When this is ran in IE 8 or under it will throw error: Unable to get value of the property 'heightModel': object is null or undefined.

    I've trace down the code and notice the place that's triggering this error is from the beginLayoutCycle function where ownerContext.boxNames is undefined, therefore heightModel is also undefined.

    What I don't quite understand is why would boxNames be undefined in this case, I notice that the ownerContext is the correct classtype, but I did notice something odd is that firstCycle was false when this error is triggered.

    I couldn't get this to repeat in firefox or chrome, so I'm wondering if it is known bug for IE.

    Extra context:
    Looks like beginLayoutCycle was called from resetLayout function which does something to set beginLayout... but then everything was triggered from invlidate function which invalidates layout components.

    So I'm trying to figure out and understand why the ownerContext object doesn't contain boxNames in this case for IE browsers.

    If anyone have experience with this problem or idea to what might be causing this, it would be really helpful.

    Thanks

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    What Ext JS 4.x.x version are you using? Can I get an example to reproduce?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Currently we are using Ext JS version 4.1.3.

    This is a sample of the code that we generate for grid-panel-grid item.

    Code:
    var AssignedStore = Ext.create('Ext.data.Store', {
                        model: 'LookupConfigRecord',
                        autoLoad: false,
                        proxy: Ext.create('Ext.data.proxy.Ajax', {
                            url: '/Data/AssignedValue/15',
                            reader: Ext.create('Ext.data.reader.Json', {
                                root: 'Data',
                                totalProperty: 'TotalSize'
                            })
                        })
                    });
        
                    // declare the source Grid
                    var TestDataAssignedGrid = Ext.create('Ext.grid.Panel', {
                        multiSelect: true,
                        id: 'TestDataAssignedGrid',
                        width: 300,
                        viewConfig: {
                            plugins: {
                                ptype: 'gridviewdragdrop',
                                dragGroup: 'TestData1AssignedGridGroup',
                                dropGroup: 'TestData1AvailableGridGroup'
                            },
                            listeners: {
                                beforedrop: function (node, data, dropRec, dropPosition) {
                                    assignMask.show();
                                    var IdArray=new Array();
                                    for (i = 0; i < data.records.length; i++) {
                                        IdArray[i]=data.records[i].get('ID');
                                    }
                                }
                            }
                        },
                        store: TestData1AssignedStore,
                        columns: columns,
                        stripeRows: true,
                        title: 'Assigned',
                        margins: '0 5'
                    });
                
        var AvailableStore = Ext.create('Ext.data.Store', {
                        model: 'LookupConfigRecord',
                        autoLoad: false,
                        proxy: Ext.create('Ext.data.proxy.Ajax', {
                            url: '/Data/AvailableValue/15',
                            reader: Ext.create('Ext.data.reader.Json', {
                                root: 'Data',
                                totalProperty: 'TotalSize'
                            })
                        })
                    });
        
                    // declare the source Grid
                    var TestData1AvailableGrid = Ext.create('Ext.grid.Panel', {
                        multiSelect: true,
                        id: 'TestData1AvailableGrid',
                        width: 300,
                        viewConfig: {
                            plugins: {
                                ptype: 'gridviewdragdrop',
                                dragGroup: 'TestData1AvailableGridGroup',
                                dropGroup: 'TestData1AssignedGridGroup'
                            },
                            listeners: {
                                beforedrop: function (node, data, dropRec, dropPosition) {
                                    unassignMask.show();
                                    var IdArray=new Array();
                                    for (i = 0; i < data.records.length; i++) {
                                        IdArray[i]=data.records[i].get('ID');
                                    }
                                }
                            }
                        },
                        store: TestData1AvailableStore,
                        columns: columns,
                        stripeRows: true,
                        title: 'Available',
                        margins: '0 5'
                    });
                    
                    var assignMask = new Ext.LoadMask(Ext.getBody(), {msg:"Assigning..."});
        var unassignMask = new Ext.LoadMask(Ext.getBody(), {msg:"Un-Assigning..."});
    
        var tabs = Ext.widget({
            xtype: 'form',
            id: 'tabForm',
            layout: 'fit',
            border: false,
            bodyBorder: false,
            items: {
                xtype: 'tabpanel',
                activeTab: 0,
                defaults: {
                    layout: 'anchor'
                },
                items: [Ext.create('Ext.panel.Panel', {
                        title: 'Value Configuration',
                        layout: 'anchor',
                        items: [
                            Ext.create('Ext.panel.Panel', {
                            title: 'TestData',
                            layout: {
                                type: 'hbox',
                                align: 'stretch',
                                padding: 5
                            },
                            collapsible: true,
                            collapsed: true,
                            listeners: {
                                expand: function (p, eOpts) {
                                    TestDataAssignedGrid.store.load();
                                    TestData1AvailableGrid.store.load();
                                }
                            },
                            items: [TestData1AvailableGrid, Ext.create('Ext.panel.Panel', { html: '<div class="dd-controls"><a onclick="manualDragDrop(TestData1AvailableGrid, TestDataAssignedGrid, \'Assigned\', \'TestData\', \'15\', \'/Data/AssignValue\', \'/Data/UnassignValue\')" class="dd-fwd">fwd</a><a onclick="manualDragDrop(TestDataAssignedGrid, TestData1AvailableGrid, \'Unassigned\', \'TestData\', \'15\', \'/Data/UnassignValue\', \'/Data/UnassignValue\')" class="dd-back">back</a></div>', width: 100 }), TestDataAssignedGrid]
                        })]
                        })]
                        }
                        });
    Typically there is more than one tab panel and each tab panel have multiple set of these grid-panel-grid objects.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •