cancel
Showing results for 
Search instead for 
Did you mean: 

Tree table not refreshing on model change in IE

Former Member
0 Kudos

We are using a tree table in a view used in MVC pattern.

I have single JSON Model defined as below:

this.oModel = new sap.ui.model.json.JSONModel();

var data = {

  dataSources:{

  CDSDataSource:false,

  ODataDataSource:true,

  DDICDataSource:false

  },

  destinations : [],

  serviceData : {

  root:[]

  },

  entityTypeName:"",

  connectionData : {

  root:[]

  },

  serviceMetaData: {

  root:[]

  },

  xmlMetadata:{

  root:[]

  },

  entitySetData:{

  root:[]

  },

  entitySetOperations:{

  root:[]

  },

  constructedServiceMetadata:{

  root:[]

  },

  filterableProperties:{

  root:[]

  },

  selectionString:"Select Systems / Source Types"

  };

this.oModel.setData(data);

I am using this model to bind multiple controls in the viewsuch as Tables, Treetable, Drop down, Textfields etc.

On one of the event of a control I am updating the part of the main model which was bound to the tree table. (which was initially an empty model), But after updating the model with values and doing the

that.oModel.setProperty("/serviceData/root",rootServiceNodes);

that.oView.getTreeTable().bindRows("/serviceData");

With this code my view would be initially empty and on the event the treatable refreshes and shows the data in boith Google Chrome and Mozilla firefox. But when tried the same thing in Internet Explorer the tree table will always be showing "No Data".

Please let me know if I have to handle tree table binding and re rendering with some different logic for IE?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

This issue is solved now.

The issue was nothing related to Treetable but instead of the JSON model.

Description:

Tree table once bound to a JSON model shows only first 100 nodes by default. To show more nodes we have to set the limit of the JSON model explicitly using setSizeLimit(value) method.

Since my JSON response was dynamic and it was quite huge I used setSizeLimit(Number.MAX_SAFE_INTEGER ) and this was the culprit as Number.MAX_SAFE_INTEGER  is not supported in IE and hence my JSON model was not reacting properly and hence the problem in UI.

Solution use setSizeLimit(<valid_value) with some valid value for ex: 99999

With Regards

Poornesh Sharma

Answers (1)

Answers (1)

former_member182862
Active Contributor
0 Kudos

It is hard to tell. Do you see any errors in IE?

Thanks

-D

Former Member
0 Kudos

No Dennis,

I don't see any errors in console, and on debugging I am able to see the model is updated with new records, and the model is bound to the tree table. But on the UI there is no change.

With Regards

Poornesh Sharma

former_member182862
Active Contributor
0 Kudos

Can you try this?

var m = that.oView.getModel();
m.setProperty("/serviceData/root",rootServiceNodes);
m.refresh(); // or m.refresh(true);

Thanks

-D

Former Member
0 Kudos

No Dennis,

I tried both  m.refresh(true); and m.refresh() but still no difference in UI. Please find attached screenshot of code snippet and watch window in debugging showing the model data.

With regards

Poornesh Sharma