Hi,
While trying to create a select i am facing two problems one is binding the data into items of the select component.
and other is my select field moving at right of the screen.While doing in the MVC with eclipse.Please find the code
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.core.setModel(oModel);
var seltemp = new sap.ui.core.Item({
key : "{Country}",
value : "{revenue}"
});
var sel = new sap.m.Select({
id : "selct"
});
sel.setModel(oModel);
sel.bindItems( {path : "/businessData",template :seltemp });
return (sel);