cancel
Showing results for 
Search instead for 
Did you mean: 

How do i extend or overwrite standard methods in sap ui5? sap.m.carousel

former_member190063
Participant
0 Kudos

Hi,

There is a standard method in sap.m.carousel setActivePage() in sapui5 carousel control. How do i overwrite this method. Because this setActivePage method fires an event called pageChanged. Also when they press arrow button , same event gets triggered.

1) setActivePage ----> Trigggers --> pageChanged event

2) Press ArrowButton in carousel --- > Triggers ---- > pageChanged event

Both 1 and 2 triggers same event. I need to identify which one has triggered the event. Is there possibility to overwrite setActivePage method which fires pageChanged event?

https://sapui5.hana.ondemand.com/#/api/sap.m.Carousel%23methods/setActivePage

sergei-u-niq
Active Contributor

You could extend the caroussel Control to a CustomCaroussel and overwrite the method there.

You also could (maybe should) open an incident for feature request. Maybe keeping same event for backward compatibility reasons, but adding a parameter to event payload, which tells the reason why page changed, or something like that.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190063
Participant
0 Kudos

Hi Segei Haller,

I have created an incident for the issue.

https://github.com/SAP/openui5/issues/3044

Do we have any working example for overwriting the standard methods in sap ui5 control?

Regards

Karthik S