'event'에 해당되는 글 2건

  1. 2008/04/29 event tab
  2. 2008/04/07 event 처리

event tab

개발관련/extjs 2008/04/29 17:14


 var tabs2 = new Ext.TabPanel({
        renderTo: document.body,
        activeTab: 0,
        width:600,
        height:250,
        plain:true,
        defaults:{autoScroll: true},
        items:[{
                title: 'Normal Tab',
                html: "My content was added during construction."
            },{
                title: 'Ajax Tab 1',
                autoLoad:'ajax1.htm'
            },{
                title: 'Ajax Tab 2',
                autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
            },{
                title: 'Event Tab',
                listeners: {activate: handleActivate},
                html: "I am tab 4's content. I also have an event listener attached."
            },{
                title: 'Disabled Tab',
                disabled:true,
                html: "Can't see me cause I'm disabled"
            }
        ]
    });
event catch의 다른 방법이 보임
TAG event, extjs

event 처리

개발관련/extjs 2008/04/07 15:11
Extjs는 eventmanager라는 class가 있음
http://extjs.com/deploy/ext/docs/output/Ext.EventManager.html#addListener

예를들어 extjs.store가 load가 발생할 경우 load라는 이벤트가 발생한다.
api 메뉴얼에서 참조 하면 됨.

발생된 event를 catch해서 작업을 수행하고자 할 경우

샘플
el.on({
    'click' : {
        fn: this.onClick
        scope: this,
        delay: 100
    },
    'mouseover' : {
        fn: this.onMouseOver
        scope: this
    },
    'mouseout' : {
        fn: this.onMouseOut
        scope: this
    }
});


    ///////////////////////////////////////
    // 실 소스에서 event 추가
    // store는 Extjs.store를 사용
    store.on ({  
        'load':{
            fn: function(){
                alert('aborted')
            }
        }
    }); 

TAG event, extjs