Extjs4.2 選擇器 Ext.ComponentQuery.query

1.基於xtype查找組件: var panels = Ext.ComponentQuery.query(‘panel’);
2.查找二級xtype:var buttons = Ext.ComponentQuery.query(‘panel button’);
3.基於屬性值檢索組件:var saveButton = Ext.ComponentQuery.query(‘button[action=”saveUser”]’);
4.混合查找組件:var buttonsAndTextfields = Ext.ComonentQuery.query(‘button, textfield’);
5.基於ID查找組件:var usersPanel = Ext.ComponentQuery.query(‘#usersPanel’);
6.基於組件的presence(不太明白這個應該怎麼翻譯):var extraOptionsComponents = 7.Ext.ComponentQuery.query(‘component[extraOptions]’);
8.使用組件的成員方法查找:var validField = Ext.ComponentQuery.query(‘form > textfield{isValid()}’);

   1: var panels = Ext.ComponentQuery.query('panel');
   2: var buttons = Ext.ComponentQuery.query('panel button'); 
   3: var saveButton = Ext.ComponentQuery.query('button[action="saveUser"]');
   4: var buttonsAndTextfields = Ext.ComonentQuery.query('button, textfield');
   5: var usersPanel = Ext.ComponentQuery.query('#usersPanel');
   6: var extraOptionsComponents = Ext.ComponentQuery.query('component[extraOptions]');
   7: var validField = Ext.ComponentQuery.query('form > textfield{isValid()}');

原文鏈接
這裏寫鏈接內容

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章