on 2020 Mar 01 8:04 PM
This is the xml view of Carousel with two pages added by default.
<Carousel class="sapUiContentPadding caro" loop="true" pageChanged="caroChanged"
width="60%" id="caro">
<pages>
<Image id="caroImg1" src="images/dclarke_rock.jpg" />
<Image id="caroImg2" src="images/dex.jpg" />
</pages>
</Carousel>
This is the controller of the above view in which I tried to add another page.
onInit: function(evt) {
oPage=new sap.m.Page("caroImg3",{
content:[
new sap.m.Image({
src:"images/wp.jpg",
alt : "This is Sap UI5 section"
})
]
});
this.byId("caro").addPage(oPage);
},
Images added by default are workin fine but the above added image shows like this:-
Hey,
maybe the example from the UI5 Documentation can help you out.
More specifically the 'onInit' and the '_setNumberOfImagesInCarousel' methods. Hope it helps.
Best regards,
Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
true, mukherjee_gourab1998_97 just need to remove page and add the image directly to the carousel.. But marcobeier, still the page is displayed there, so image should be displayed inside that right?
Hey maheshkumar.palavalli I get what you mean according to his code there should be a page inside a page which then has the third picture inside of it. I don't see him declare 'oPage' as variable though.
Take a look at this plnkr: http://next.plnkr.co/edit/cjntmtuP4JW8RDtF
Anyway, both cases:
1. Directly add the image as well as
2. Add the page object with the image inside of it ...
work in the plnkr so that might help him.
Best Regards,
Marco
marcobeier, ah, so that is the issue 😄 😄
thanks for the update..
User | Count |
---|---|
69 | |
8 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.