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

sap.m. SearchField Implementation not working

$
0
0

Hi Guyz,

 

I am trying to implement the SearchField in a table. My controller code is not working and i am not sure what mistake i am making. Please help.

 

View.xml

 

<Bar>

  <contentLeft>

  <SearchField id="search" search="onSuggest"

  width="100%"></SearchField>

 

  </contentLeft>

  </Bar>

 

controller.js

 

onSuggest: function(oEvent)

{

   var tpmla = oEvent.getParameter("newValue");   

       var filters = new Array();

       var oFilter = new sap.ui.model.Filter("MyJSONData>/CData",sap.ui.model.FilterOperator.Contains, tpmla);

       filters.push(oFilter);

  

      //get list created in view

      this.oList =sap.ui.getCore().byId("CData>/key");

      this.oList.getBinding("oItem").filter(filters);

 

 

 

}


Viewing all articles
Browse latest Browse all 2803

Trending Articles



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