I have two functions in the controller, one of which is used for processing some event, let's say button click.
This one works fine:
handleUploadPress: function(oEvent) {
var oFileUploader = this.byId("streamerUploader");
if (!oFileUploader.getValue()) {
MessageToast.show("Choose file");
return;
}
And this one throws error:
showResponse: function(id, response) {
this.byId("streamerUploader").someMethod();
}
In both functions "this" equals event provider, however, this.byId() returns undefined in the second one. What is the reason?