cancel
Showing results for 
Search instead for 
Did you mean: 

SAP UI5 Calling Function present in view from its controller

pinakipatra
Contributor
0 Kudos

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();

Accepted Solutions (1)

Accepted Solutions (1)

AndreasKunz
Advisor
Advisor
0 Kudos

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

pinakipatra
Contributor
0 Kudos

Thanks Andreas ..It works

former_member182862
Active Contributor
0 Kudos

Hi Pinaki

Can kindly mark discussion as 'Answered' or 'Helpful' if you have received help?

At least, we can track answered questions from the unanswered ones.

Thanks

-D

pinakipatra
Contributor
0 Kudos

Hi ,
Thanks for reminding me and sorry for the delayed reply .
It certainly helped .
I have marked it now

Answers (0)