Skip to Content

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

SAP UI5 Calling Function present in view from its controller

Hi Experts ,
How do i

call a function present in view from its controller. I am using

var oView =this.createId("xyz");  //from the controller

//view xyz contains a method named abc.I am trying to call that using

oView.abc();

Former Member
replied

Hi Pinaki,

please re-read the documentation of View.createId(). It only constructs the full (prefixed) ID string. It returns a string, not a View.

Try

     this.getView().abc();

instead.

Regards

Andreas

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