Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

Re: Sap.m.table sort / filter problem

$
0
0

Thats is the code wehre i set the filters:

 

  var tab = sap.ui.getCore().getElementById("Install_Data");

                                         var  bind =  tab.getBinding("items");

                                         var sorter = new sap.ui.model.Sorter(sortPath, params.sortDescending);

                                         

        

// apply filter

          var aFilters = [];

          for ( var i = 0; i < params.filterItems.length; i++)

          {

          var oItem = params.filterItems[i];

          var akey  = oItem.getKey();

          var atext = oItem.getText();

          var oFilter = new sap.ui.model.Filter(akey,sap.ui.model.FilterOperator.EQ,atext);

          aFilters.push(oFilter);

          };

          bind.sort(sorter);

          bind.filter(aFilters);

 

That works fine.

The problem is with this:

          

var tab = sap.ui.getCore().getElementById("Install_Data");

            var  bind =  tab.getBinding("items");

                                         bind.aSorters = null;

                                         bind.aFilters = null;

 

 

That removes the sorters and filters but the view is not refreshed.

On the view there is still the filtered / sorted display.

So i get it the view must be renewed. I tried view.rerender and tab.rerender but that didnt

do anything.

I understand what is wrong but i dont know how to actualize the display.

 

regards.

 

Dirk


Viewing all articles
Browse latest Browse all 8644

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>