1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    13
    Vote Rating
    0
    manishnp is on a distinguished road

      0  

    Default Unanswered: Extjs Button Clicked Multiple Times

    Unanswered: Extjs Button Clicked Multiple Times


    Hi ,
    I found one solution for the problem which I am facing , but it was for Sencha Touch.You can follow the link

    http://stackoverflow.com/questions/1...h-a-view-twice

    What I need now how I can prevent a button which if gets clicked multiple times executes the code and then there is a mess.

    On my button click I am loading a View and Showing it to a Center Region panel.When I click the Button multiple times(i.e keep on clicking the button ) it just make the screen blank.

    I want to prevent this multiple clicks.


    Thanks
    Manish Pandit



  2. #2
    Sencha Premium Member
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    29
    Answers
    10
    Vote Rating
    7
    Johnny Major is on a distinguished road

      0  

    Default


    When the button is clicked you could first mask the screen then proceed.

  3. #3
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,770
    Answers
    355
    Vote Rating
    165
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    I think I'd disable (or mask) the button add a listener to the store's load event to enable (unmask) it.

    Code:
    handler: function (btn) {
        var store = view.getStore();
    
    
        store.on({
            load: function () {
                btn.enable();
            },
            single: true
        });
    
    
        btn.disable();
        store.load();
    }
    If the view's store and this load button are stable fixtures you could even just add a beforeload and load listener to the store to disable / mask the button and then enable it on load and the button handler would just have the view.getStore().load() action.
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

Thread Participants: 2

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar