Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with eventhandler and this

Hi

I got a problem with "this" in an eventhandler, when i create a new entity using the odata.v2 model.

I wan´t to call a method on another controller, when the update is successful.

oModel.create('/data', oEntry, {success: this._oListController.createOk});

The this._oListController.createOk method is called, but in the method "this" point to the window object. How can i change the reference to another type?

Kind regards,

Kim

Former Member
replied

oModel.create('/data', oEntry, {success: $.proxy(this._oListController.createOk, this._oListController.) } );

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question