Hi experts,
I'm a beginner in SAPUI5, I have created a simple standalone Master Detail application. My Master list searches for a Customer using OData service to backend. On select of the Customer from the master list, I have Detail page with header as Customer detail and IconTabBar consists of list of Profile Orders in the form of table.
By default Profile Order table will be sap.m.table. But, I want the sorting and filtering to be like sap.ui.table. So I have changed the table to sap.ui.table in the Detail.view.xml view . For the detail view by default the template is using JSON model, so I think its not required to do any changes in the Detail.controller.js for the sorting filtering to work.
/*global location */
sap.ui.define([
"zmasterdetailprototype/controller/BaseController",
"sap/ui/model/json/JSONModel",
"zmasterdetailprototype/model/formatter"
], function(BaseController, JSONModel, formatter) {
"use strict";
return BaseController.extend("zmasterdetailprototype.controller.Detail", {
formatter: formatter,
/* =========================================================== */
/* lifecycle methods */
/* =========================================================== */
onInit: function() {
// Model used to manipulate control states. The chosen values make sure,
// detail page is busy indication immediately so there is no break in
// between the busy indication for loading the view's meta data
var oViewModel = new JSONModel({
busy: false,
delay: 0,
lineItemListTitle: this.getResourceBundle().getText("detailLineItemTableHeading")
});
this.getRouter().getRoute("object").attachPatternMatched(this._onObjectMatched, this);
this.setModel(oViewModel, "detailView");
this.getOwnerComponent().getModel().metadataLoaded().then(this._onMetadataLoaded.bind(this));
},
Please guide me how to go ahead with this.
Thank you