Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to get data from odata services in search field of value help

search method in controller of value help is posted.No reference of xml(like id of some list) is to be taken since the  search field is in the controller part of value help.plz help. 

if (oFilterBar.setBasicSearch) {

  

  oFilterBar.setBasicSearch(new sap.m.SearchField({showSearchButton:true, placeholder:"Search", enabled:true,

  LiveChange:function(){

  if (this.getValue().length > 0){

  var oDataObj = new sap.ui.model.odata.ODataModel("http://services.odata.org/Northwind/Northwind.svc/");

  //var oDataObj = new sap.ui.model.json.JSONModel("http://services.odata.org/Northwind/Northwind.svc/Categories?$format=json");

  sap.ui.getCore().setModel(oDataObj,"OdataObj");

  this.bindElement({ path: "/CompanyCodeValuehelp", parameters: {expand: "CompanyCodeName",select: "CompanyCodeName"}});

  }

  }})); 

  }

Former Member
Not what you were looking for? View more on this topic or Ask a question