Skip to Content

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 31, 2014 at 05:26 PM

    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

    Add comment
    10|10000 characters needed characters exceeded