on 11-03-2015 1:49 PM
Hi,
Is it possible to bind the sap.m.Carousel control with a list? So bind an aggregation of pages using any control (except complex controls) as template.
I tried something myself, but it doesn't work. Any help, examples are welcome
Thanks,
Robbe Wuyts
Hi!
var oCarousel = new sap.m.Carousel({
loop : true
});
var oModel = new sap.ui.model.json.JSONModel(oController.getCategoryList().d);//sync
oController.getCategoryList().d.results.forEach(function(category) {
if (category.CATEGORY_ID) {
oCarousel.addPage(new sap.m.Page({ title: category.title)
}
});
or
var oPage = new sap.m.Page({ title: "{title}"
oCarousel.bindAggregation("pages", "/", oPage"}));
oCarousel.setModel(yourModel);
PS: instead sap.m.Page you can use any element, perfect way this create separate views and add to carousel
var page = new sap.ui.core.mvc.JSView({
id : Id,
viewName : "name.view." + pageId
});
oCarousel.addPage(page)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.