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

Facing problems while using search field

$
0
0

Hi ,

I am trying to create a search field but instead of search field i am getting the values.Please help me out.And i am attaching the output of below code

 

sap.ui.jsview("searchfield.searchField", {

 

 

  getControllerName : function() {

  return "searchfield.searchField";

  },

 

 

  createContent : function(oController) {

 

  var oModel = new sap.ui.model.json.JSONModel({

  businessData : [

  {Country :"Canada",revenue:410.87,profit:-141.25, population:34789000},

  {Country :"China",revenue:338.29,profit:133.82, population:1339724852},

  {Country :"France",revenue:487.66,profit:348.76, population:65350000},

  {Country :"Germany",revenue:470.23,profit:217.29, population:81799600},

  {Country :"India",revenue:170.93,profit:117.00, population:1210193422},

  {Country :"United States",revenue:905.08,profit:609.16, population:313490000}

  ]

  });

 

  sap.ui.getCore().setModel(oModel);

 

  var lis = new sap.m.List({

  title : "Hiii"

  });

 

  var stanList = new sap.m.StandardListItem({

  title : "{Country}"

  });

 

  var searcFie = new sap.m.SearchField({

  //value : "{Country}",

  placeholder : "type",

  search : function(oevent)

  {

  alert (oevent.getParameter("query"));

  }

  });

 

 

  lis.bindItems({path : "/businessData",template : stanList});

 

  //searcFie.setModel(oModel);

 

  //searcFie.bindValue("/businessData");

 

  return (searcFie,lis);

 

 

  }

 

 

});

 

Message was edited by: Michael Appleby


Viewing all articles
Browse latest Browse all 9069

Trending Articles



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