ho modificato come hai detto te, adesso esce un altro errore due righe piu sotto

codice:
var wrapper = this.element.retrieve('wrapper');
this.element is null