Skip to Content

Issue with sap.m.ComboBox - Not displaying data

Hi all

I've an issue with the ComboBox. After navigating from the app to the home page and back to the app, the combobox displays the right number of lines (items from OData) but no text. And when selecting one of the empty lines there's no key.

When first loading the app (by clicking its tile on the Fiori launchpage), the OData service correctly populates the ComboBox (using bindItems() in the view's controller):

If navigating back to the Fiori launchpage then click the app tile to go back into the app, the OData service is triggered again but now no data is in the ComboBox (but the number of lines are as expected; in this example it results in 5 empty lines but no text/key):

If I do a browser refresh (F5) at this stage then the data is displayed as if the app is loaded for the first time.

Anyone seen this behaviour before?

The code that populates the ComboBox is as follows, this method is called in onInit() of the view controller:

	    setReports: function(ipType, ipNoMsg){
	        var oDropDown = this.byId("selectEmployee");
			    path: ipType,
			    template: this._oTemplate,
			    events: {
			        dataRequested: function(oEvent){
			        dataReceived: function(oEvent){

When exiting the app, I've tried (in onExit() of the view's controller) to destroyItems(), unbindItems() and removeAllItems() on the ComboBox but it makes no difference.

Any help and insight appreciated.

before.png (13.2 kB)
after.png (6.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 24, 2017 at 01:37 PM

    your code....

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 24, 2017 at 01:48 PM

    Hi Thomas,

    Kindly check the id of the combobox.

    Then look it.

    As you are using the bindItems() in the view's controller then the values are binding to the combobox.

    I am expecting you may wrote this binditems() in the oninit() function.

    But when navigate to the the back page the model will not be updated.


    Deepak Raj.

    Add comment
    10|10000 characters needed characters exceeded