Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    yalster is on a distinguished road

      0  

    Default Paging Toolbar: data undefined

    Paging Toolbar: data undefined


    I get an error with ExtJS4 and Sencha Architect 2 I dont't really understand. The app throws a "Uncaught TypeError: Cannot read property 'data' of undefined" with the following configuration:

    I have a grid panel with a paging toolbar. Then I have a controller which has a selectionchange method. So when a user clicks on a row in the gridpanel the data of the row shows in a tab panel. After that the paging toolbar does not work anymore. When you click on an arrow the app doesn't update the grid. The funny thing is when you click on the arrow another time the grid panel gets updated again but it skips the next page and jumps directly to the page after e.g. from page 1 to page 3. Here's the code of the controller.

    Code:
    Ext.define('a2web.controller.ReklamationenController', {
        extend: 'Ext.app.Controller',
    
        views: [
            'Main'
        ],
    
        refs: [
            {
                ref: 'RightContainer',
                selector: '#RightContainer'
            }
        ],
    
        onGridpanelSelectionChange: function(tablepanel, selections, options) {
            this.getRightContainer().down('#ReklDetails').update(selections[0].data);
            this.getRightContainer().down('#ReklDetails2').update(selections[0].data);
        },
    
        init: function() {
            this.control({
                "gridpanel": {
                    selectionchange: this.onGridpanelSelectionChange
                }
            });
    
        }
    
    });
    Here's the code of the view:
    Code:
    Ext.define('a2web.view.Main', {
        extend: 'Ext.container.Viewport',
        alias: 'widget.main',
    
        layout: {
            align: 'stretch',
            type: 'hbox'
        },
    
        initComponent: function() {
            var me = this;
    
            Ext.applyIf(me, {
                items: [
                    {
                        xtype: 'panel',
                        width: 250,
                        autoScroll: false,
                        activeItem: 0,
                        collapseDirection: 'left',
                        collapsed: true,
                        collapsible: true,
                        title: 'a2web',
                        items: [
                            {
                                xtype: 'button',
                                width: 250,
                                text: 'Reklamationen'
                            },
                            {
                                xtype: 'button',
                                id: 'ReklamationErfassen',
                                width: 250,
                                text: 'Reklamation erfassen'
                            }
                        ]
                    },
                    {
                        xtype: 'container',
                        frame: true,
                        id: 'RightContainer',
                        layout: {
                            align: 'stretch',
                            type: 'vbox'
                        },
                        flex: 1,
                        items: [
                            {
                                xtype: 'gridpanel',
                                id: 'ReklGrid',
                                width: 820,
                                autoScroll: false,
                                title: 'Reklamationen',
                                enableColumnHide: false,
                                enableColumnMove: false,
                                store: 'Reklamationen',
                                flex: 1,
                                columns: [
                                    {
                                        xtype: 'gridcolumn',
                                        width: 80,
                                        dataIndex: 'ReklDatum',
                                        text: 'Datum'
                                    },
                                    {
                                        xtype: 'gridcolumn',
                                        width: 250,
                                        sortable: false,
                                        dataIndex: 'ReklText',
                                        text: 'Text'
                                    },
                                    {
                                        xtype: 'gridcolumn',
                                        width: 150,
                                        sortable: false,
                                        dataIndex: 'ReklStrasse',
                                        text: 'Strasse'
                                    }
                                ],
                                viewConfig: {
                                    cls: '',
                                    id: 'ReklGridView'
                                },
                                dockedItems: [
                                    {
                                        xtype: 'pagingtoolbar',
                                        frame: false,
                                        maintainFlex: false,
                                        afterPageText: 'von {0}',
                                        beforePageText: 'Seite',
                                        displayInfo: true,
                                        displayMsg: 'Datensatz {0} - {1} von {2} ',
                                        emptyMsg: 'Keine Daten zum Anzeigen vorhanden',
                                        firstText: 'Erste Seite',
                                        lastText: 'Letzte Seite',
                                        nextText: 'Nächste Seite',
                                        prevText: 'Vorherige Seite',
                                        refreshText: 'Aktualisieren',
                                        store: 'Reklamationen',
                                        dock: 'bottom'
                                    }
                                ]
                            },
                            {
                                xtype: 'tabpanel',
                                id: 'ReklContainer',
                                activeTab: 0,
                                flex: 1,
                                items: [
                                    {
                                        xtype: 'panel',
                                        layout: {
                                            align: 'stretch',
                                            type: 'vbox'
                                        },
                                        title: '1 - Details',
                                        items: [
                                            {
                                                xtype: 'panel',
                                                id: 'ReklDetails',
                                                tpl: [
                                                    '{ReklDatum} - {ReklStrasse}'
                                                ],
                                                flex: 1
                                            }
                                        ]
                                    },
                                    {
                                        xtype: 'panel',
                                        layout: {
                                            align: 'stretch',
                                            type: 'vbox'
                                        },
                                        title: '2 - Details',
                                        items: [
                                            {
                                                xtype: 'panel',
                                                id: 'ReklDetails2',
                                                tpl: [
                                                    '{ReklText}'
                                                ],
                                                flex: 1
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ]
            });
    
            me.callParent(arguments);
        }
    
    });
    Any help would be greatly appreciated

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    yalster is on a distinguished road

      0  

    Default


    * bump * anyone?