cancel
Showing results for 
Search instead for 
Did you mean: 

Calling function inside other function in UI5

Former Member
0 Kudos

Hello Expert ,

using this.getView().getController().onOtherFuction();

we can trigger a onOtherFuction() from different function.

But If  onOtherFuction: function(Event) I have declare and that oEvent has been used in logic

In this case oEvent ll gets undefined or that oEvent related logic in onOtherFuction will gets fail .

Can  anyone help on this to trigger onOtherFuction() with related oEvent is possible any how?

Thanks in advance .

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sulekha,

It's just a matter of passing Event Parameter, Whatever you are sending , you should be able to recieve it in function definition.

this.getView().getController().onOtherFunction(oEvent);

Have you tried this way?

I hope this shud work.

Regards

Ravikant

Former Member
0 Kudos

Hi Ravikant.

Yes I have try this.

But it will take oEvent from the function u are calling onOtherFuction.

It will not take oEvent  which belong from onOtherFuction.

Former Member
0 Kudos

Hi Sulekha,

I m getting the sense what you are trying to do, I think you want to call standard event handler by your own. Standard event handler like RouteMatched, AttachPress, AttachDelete, These methods are triggered by some event on UI and it sends oEvent object to the called function.

I'm not sure if you can call standard event handler without performing that event from UI.

Regards

Ravikant