Hi Experts,
Requirement is when user clicks on master view data then details data should be appear in detail view in SplitApp.
I have 5 XML views.I want to bind master and detail view.I am using OData model.
In Master.controller.js code is....
handleListItemPress : function (evt) { var context = evt.getSource().getBindingContext(); this.nav.to("Detail", context);
In SplitApp.controller.js
to : function (pageId, context) { this.app = this.getView().idRoot; // load page on demand var master = ("Master" === pageId); if (this.app.getPage(pageId, master) === null) { var page = sap.ui.view({ id : pageId, viewName : "sap.ui.ghmsad" + pageId, type : "XML" }); page.getController().nav = this; this.app.addPage(page, master); jQuery.sap.log.info("app controller > loaded page: " + pageId); } // show the page this.app.to(pageId); // set data context on the page if (context) { var page = this.app.getPage(pageId); page.setBindingContext(context); } }
I am getting an error with function to(). "cannot read property 'to' of undefine".
But same code is working for JSON Model.
Thanks,
Prashant