Skip to Content

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

Not showing text on dropdownbox

Hi Experts

I am binding model to view as follow

myView.setModel(myModel, "modelName")

Following is my Model

myModel = {

                   basicDetails:{
                                             "fName":"Anthony",

                                             "groupList":[{ name: "Test1" , value:"1"},{name:"Test2",value:"2"}]
                                        }

                    productDetails:{}
                    variance:"test",

                    package: "QQP000"

                   }

Now I am trying bind drop-down list "ddlGroups" as follow

var oItemTemplate1 = new sap.ui.core.ListItem();

  oItemTemplate1.bindProperty("text", "name");

ddlGroup.bindItems("modelName>/basicDetails/groupList", oItemTemplate1);

It show two empty Item. I am not sure why it is not showing any text in that item. If I add 3 item in groupList array it show 3 empty Item.

Any help is appreciated

Thanks in advance

Former Member
Former Member replied

oItemTemplate1.bindProperty("text", "modelName>name");

1 View this answer in context

Helpful Answer

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