I using below sample code for using the combo box . How do i assign the user selected value from combo box as value to a variable "MyVariable" .
<ComboBox id="combobox" items="{/Customers}" >
<items>
<core:Item key="{CustomerID}" text="{CompanyName}"/>
</items>
</ComboBox>
var oModel = new sap.ui.model.odata.ODataModel("http://services.odata.org/Northwind/Northwind.svc", true);
this.getView().setModel(oModel);
oFilter = new sap.ui.model.Filter("ContactTitle", sap.ui.model.FilterOperator.EQ, "Owner");
this.getView().byId("combobox").getBinding("items").filter(oFilter);