It requires the following steps:
- Get the Table instance of sap.m.Table
- call the getBinding() method to get the instance of sap.ui.model.Binding
- From the instance of sap.ui.model.Binding, call the getPath() method. It returns the path of the Model to which the Binding happens. ( Code Example below)
- pass the model path value in the method getModel() of sap.ui.model.Binding. It returns the sap.ui.model.Model instance.
var modelBindingInstance = mTableInstance.getBinding('items');
var modelPath = modelBindingInstance.getPath()
var modelInstance = modelBindingInstance.getModel(modelPath);