1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    146
    Vote Rating
    0
    rahulmca1@gmail.com is on a distinguished road

      0  

    Default beforeclose/close listener not invoked Why?

    beforeclose/close listener not invoked Why?


    Want to handle cross/close button click of window so I used listener but my handlers are not invoked why?
    If I add listener for beforehide that works but does not works for beforeclose/close

    Code:
     /*
     * Ext JS Library 2.0.1
     * Copyright(c) 2006-2008, Ext JS, LLC.
     * licensing@extjs.com
     * 
     * http://extjs.com/license
     */
    
    Ext.onReady(function(){
        var win;
        var button = Ext.get('show-btn');
    
        button.on('click', function(){
            // create the window on the first click and reuse on subsequent clicks
            if(!win){
                win = new Ext.Window({
                    el:'hello-win',
                    layout:'fit',
                    width:500,
                    height:300,
    				closable:true,
                    closeAction:'hide',
                    plain: true,
                    
                    items: new Ext.TabPanel({
                        el: 'hello-tabs',
                        autoTabs:true,
                        activeTab:0,
                        deferredRender:false,
                        border:false
                    }),
    
                    buttons: [{
                        text:'Submit',
                        disabled:true
                    },{
                        text: 'Close',
                        handler: function(){
                            win.hide();
                        }
                    }]
                });
    			win.addListener('close',closeButtonHandler);
                win.addListener('beforeclose',closeButtonHandler);
    			win.on ("beforeclose", function () {
    			  alert("beforeclose")
    			});
            }
            win.show(this);
        });
    });
    
    function closeButtonHandler(){
    	alert("close Button Handler");
    }
    No alert displayed.

    Thanks
    with regards

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,803
    Vote Rating
    606
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    You've set the closeAction to hide, so your window isn't closing, it's hiding.

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