I've a sapui5 application which has several controls in my page. Such as Tables , Calendar etc.
And I've create a singe model for my page in the onInit event as follows
var viewModel = new JSONModel();
//Prepare Initial Model
viewModel.setData({
LineDetails: [],
Calendar: {},
PageMode: "add",
DateStart: new Date(),
DateEnd: new Date(),
IsHistoryAvailable: false
});
this.getView().setModel(viewModel);
What I need to do is, I've to include a Smart Table inside a dialog in this page. The dialog will open once I click a button in the page. How can I bind data to the smart table inside the dialog?
I only have experience of binding the model to a smart table which either declaring default model in the manifest or in the page.
But here I've already added a model to the page in the onInit event. So how can I bind data?
Is there a way to bind smart table to a Property which included in the above declared model.
Propert name : SmartTableModel
eg :
viewModel.setData({
SmartTableModel:[]
LineDetails: [],
Calendar: {},
PageMode: "add",
DateStart: new Date(),
DateEnd: new Date(),
IsHistoryAvailable: false
});
addDependent
it has access to all the models of the view. – Marc