PDA

View Full Version : refs selector question



ttbgwt
10 Apr 2012, 4:08 PM
I have a ref selector in my view that gets a reference to the views taglist xtype component:


refs: [
{
selector: 'taglist',
ref: 'tagList'
}
]


I can then use the generated getter and get a child component by categorylist xtype:



var categoryList = this.getTagList().down('categorylist');


My question is, how can I add a selector for the above query into the refs?



refs: [
{
selector: 'taglist.down('categorylist')', //??
ref: 'categoryList'
}
]

vietits
10 Apr 2012, 4:41 PM
refs: [{
selector: 'taglist categorylist',
ref: 'categoryList'
}]

ttbgwt
10 Apr 2012, 6:35 PM
That's the same as
this.getTagList().down('categorylist')? I will give that a try.

ttbgwt
24 Apr 2012, 11:16 AM
I can add a proxy listener in my controllers onLaunch function...



onLaunch: function () {


var me = this;


me.getTagGrid().store.proxy.on({
scope: me,
exception: this.loadTagsExceptionHandler
});


But I can't figure out how to add it in my controllers init function? The proxy has an alias name of 'proxytags'



init: function () {
var me = this;


me.control({


//listen to the double-click event of the taggrid view
'taggrid proxytags': {
exception: me.loadTagsExceptionHandler
},

vietits
24 Apr 2012, 3:49 PM
control's selector is only applied for component but proxy is not component.