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 2013
    Posts
    24
    Answers
    2
    Vote Rating
    1
    winniwinter is on a distinguished road

      0  

    Default Answered: Ext.tab.Panel show() event fires only once

    Answered: Ext.tab.Panel show() event fires only once


    Hi,

    I want to use the show Event of the tab.Panel to dynamically add series to my chart that get's rendered.
    In my controller I added the event listener. On the first load I get the console log that the function is called. But when I click on another panel nothing happens...

    This is my Controller:
    Code:
    Ext.define('Griller.controller.MainTabpanelController', {
        extend : 'Ext.app.Controller',
    
    
        config : {
            refs : {
                historyButton : 'button[action=showHistory]',
                chart: 'sensorchart',
                mainPanel: 'main'
            },
            control : {
                historyButton : {
                    tap : 'showTemperatureHistory'
                },
                mainPanel: {
                    show: 'activateView'
                }
                
            }
        },
    
    
        activateView: function( eOpts) {
            console.log('something was pressed');
        },
    
    
        init : function() {
            console.log('mainTabPanelControllerInit');
        }
    
    
    });
    When I add a listener directly to the tab.panel definition it works...but I want to use my Controller for that...

    Code:
    Ext.define('Griller.view.Main', {
    	extend : 'Ext.tab.Panel',
    	xtype : 'main',
    
    
    	config : {
    		fullscreen : true,
    		tabBarPosition : 'bottom',
    
    
    		items : [ {
    			xtype : 'sensorlistview',
    			title : 'Temperature'
    		}, {
    			xtype : 'sensorchart',
    			// iconCls: 'time',
    			// action: 'showHistory',
    			title : 'History',
    			listeners : {
    				show : function() {
    					console.log('chart was pressed');
    				}
    			}
    		}, {
    
    
    			xtype : 'settingsView',
    			title : 'Settings'
    		} ]
    	}
    });

  2. Ok,

    I found the solution. I have to listen on that event on the reference of the item within the panel and not on the panel itself...a little bit strange.

    I changed the config in the controller like this:

    Code:
    config : {
    	refs : {
    		chart : 'sensorchart',
    		mainPanel : 'main'
    	},
    	control : {
    		chart : {
    			show : 'activateView'
    		}
    	}
    }
    works now!

  3. #2
    Sencha User
    Join Date
    Feb 2012
    Location
    Germany
    Posts
    72
    Answers
    8
    Vote Rating
    2
    enno is on a distinguished road

      0  

    Default


    have you tried the painted event?

    This worked for me if i remember me correct.

  4. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    24
    Answers
    2
    Vote Rating
    1
    winniwinter is on a distinguished road

      0  

    Default


    I could try that.

    But that leaves me still with the question y is the show() event only fired once if I have the listener in the controller.

    Is there a difference between defining the listener in the controller and in the class definition?

  5. #4
    Sencha User
    Join Date
    Apr 2013
    Posts
    24
    Answers
    2
    Vote Rating
    1
    winniwinter is on a distinguished road

      0  

    Default


    Ok,

    I found the solution. I have to listen on that event on the reference of the item within the panel and not on the panel itself...a little bit strange.

    I changed the config in the controller like this:

    Code:
    config : {
    	refs : {
    		chart : 'sensorchart',
    		mainPanel : 'main'
    	},
    	control : {
    		chart : {
    			show : 'activateView'
    		}
    	}
    }
    works now!

Thread Participants: 1