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 Premium Member
    Join Date
    Jan 2012
    Posts
    27
    Answers
    1
    Vote Rating
    1
    pixman is on a distinguished road

      0  

    Default Answered: Get viewConfig Events in controller

    Answered: Get viewConfig Events in controller


    Hello,
    in my treePanel i have implement the treeviewdragdrop Plugin.

    I listen the events 'drop' and 'beforedrop' in the viewConfig declaration, like this :

    Code:
    Ext.define('BKOFF.view.filemanager.FolderTree', {    extend: 'Ext.tree.Panel',
        alias : 'widget.foldersTree',
        title: 'Folders',
        animate: true,
        
        
        viewConfig: {
            plugins: [{
                     ptype: 'treeviewdragdrop'
                }],
            toggleOnDblClick: false,
            listeners: {
                beforedrop: function () { console.log('beforedrop', arguments); },
                drop: function () { console.log('drop', arguments); }
            }
        },
    But i want keep all my code in the controller.
    How make the same listenning like this, only in the controller ?

    If it's not possible, can it's possible to 'bubble' the event to the controller ?

    Thanks

  2. Code:
    this.control({
       'foldersTree dataview': {
           beforedrop: function () { console.log('beforedrop', arguments)},
           drop: function () { console.log('drop', arguments);}
       }
    });

  3. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Answers
    124
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    HI!

    yo may try to use custom events and may fire them according to your needs.

    Code:
    Ext.extend(Ext.Panel, {
        initComponent:function() {
            // parent init component
            yourClass.superclass.initComponent.apply(this, arguments);
             // add custom events
            this.addEvents('sampleEvent');
        }
         ,sampleEventing:function(arg1, arg2) {
             // fire custom event
            this.fireEvent('sampleEvent', scope, arg1, arg2);
        }
    ...

    here is the tutorial for you from Saki:-
    http://blog.extjs.eu/know-how/events...omment-page-1/
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  4. #3
    Sencha User
    Join Date
    May 2011
    Location
    Ukraine, Rivne
    Posts
    247
    Answers
    44
    Vote Rating
    42
    redraid has a spectacular aura about redraid has a spectacular aura about redraid has a spectacular aura about

      0  

    Default


    Code:
    this.control({
       'foldersTree dataview': {
           beforedrop: function () { console.log('beforedrop', arguments)},
           drop: function () { console.log('drop', arguments);}
       }
    });

  5. #4
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    27
    Answers
    1
    Vote Rating
    1
    pixman is on a distinguished road

      0  

    Default


    Quote Originally Posted by redraid View Post
    Code:
    this.control({
       'foldersTree dataview': {
           beforedrop: function () { console.log('beforedrop', arguments)},
           drop: function () { console.log('drop', arguments);}
       }
    });
    I have test the same code but quering view in place of dataview.

    Thanks a lot for your help :-)