Skip to Content

Carousel setActivePage not working


I am working on sap.m.carousel control in sap ui5. Based on some condition, i need to display the page in carousel dynamically.I am trying to achieve this by using setActivePage("pageId of carousel"). But it is not going to the expected page in carousel.

Ex: I have 5 pages in carousel. Based on condition, I want to display the 3rd page. For this. I am using setActivePage("pageId3"). But it is not working. It remains in same page even after using of setActivePage().


Karthik S

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 16, 2019 at 11:33 AM

    hi Karthik,

    You will need to provide the complete id of the Page. Since your page is within View, it id would have views id appended to it by default.

    Modify your code as follows and it should work;




    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.