ExtJS나 Sencha Touch를 사용하다보면, Component Query를 이용하여 Component를 검색하는 경우가 매우 많습니다.
별로 해당 사항은 없지만 initComponent함수내부에서 up/down함수를 이용하여 컴포넌트를 검색하는 순간이 있는데, 검색이 되지 않을 수 있습니다. 이는 초기화의 차이인데요. 부모의 초기화 함수를 호출 한 후, 실행하면 문제없이 검색이 됩니다.
initComponent: function() {
var me = this;
// The method doesn't exists yet in your extended class
me.callParent(arguments);
// Place the code here, after you have called the parent constructor.
}
참고 링크: http://docs.sencha.com/ext-js/4-1/#!/api/Ext.container.AbstractContainer-method-down
'개발 > WebApp' 카테고리의 다른 글
[ExtJs] 컨포넌트의 itemId와 id의 차이점 (1) | 2012.07.11 |
---|---|
Extjs4에서 Custom event 만들기 (1) | 2012.06.29 |