srxx123
16 Oct 2012, 4:26 AM
Hi,
I have a view with a panel with a function like this:
myfunc: function(v) {
this.getComponent('myfield').setValue(v);
}
I give a callback to this function to a xhr request which calls it in onSuccess like this:
callback('some value').
The problem is, that this is now no longer the panel where my function is defined but some other context from xhr (I think a a window object).
So how can I solve this problem? Somehow I should not use this.getComponent() but me.getComponent(). But how can I define me (I'm creating the view with SA, nothing hand coded here)?
I have a view with a panel with a function like this:
myfunc: function(v) {
this.getComponent('myfield').setValue(v);
}
I give a callback to this function to a xhr request which calls it in onSuccess like this:
callback('some value').
The problem is, that this is now no longer the panel where my function is defined but some other context from xhr (I think a a window object).
So how can I solve this problem? Somehow I should not use this.getComponent() but me.getComponent(). But how can I define me (I'm creating the view with SA, nothing hand coded here)?