Skip to Content
0
Jul 07, 2020 at 12:34 PM

issue in SmartTable does not update when binding changes using setTableBindingPath

297 Views

Hi,

I had defined below SmartTable in the XML View

<smartTable:SmartTable id="idSmartTableAll" tableType="ResponsiveTable" useVariantManagement="false" useTablePersonalisation="true" persistencyKey="SmartTableAnalytical_Explored" enableAutoBinding="true" demandPopin="true" useExportToExcel="false" showFullScreenButton="true" ignoredFields="" initiallyVisibleFields="Transformer_Name,Transformer_Type,Rated_Capacity,Load_Priority,Reason_Description1">

Below Code is in the Controller where i am passing the FromDate and ToDate as Parameter to the function loadEquipment2 and first Time SmartTable is displaying based on the FromDate and ToDate and second time for example i had passed different Dates and now the issue is there is no change in SmartTable and it is displaying with the previous Dates only and in the Network call i see previous Dates not the New Dates which i called second Time.

The Refresh of the SmartTable is not working.

loadEquipment2: function (FromDate, ToDate)

{

var that = this;

var oView = that.getView().byId("idSmartTableAll");

oView.getModel().updateBindings();

oView.getModel().refresh();

var url = "/LoadMain(IP_DATE_FROM='" + FromDate + "',IP_DATE_TO='" + ToDate + "')/Results";

oView.setTableBindingPath(url);

oView.setEntitySet("TLMView");

}