Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing full articles (6178 articles)
Browse article index
↧

Add Named Model to XML ComboBox

$
0
0

Hi experts

 

I have a sap.m. App with an XML-View and some Comboboxes. I need to use named Models. I was able to implement a Combobox with non named model, but when I use named models, I can Display the Combobox and open it. I'm also able to see the correct NUMBER of dataset entries in the Dropdown but there are no Texts.

 

I implemented the following coding:

 

in Controller.js

 

var oModel = new sap.ui.model.json.JSONModel();

 

oModel.loadData("model/area.json", "", false);

 

this.getView().setModel(oModel, "area");

 

 

in view.xml

 

<...xmlns:core="sap.ui.core... >

 

<ComboBox items="{ path:'area>/data', sorter: { path: 'area>/Name' } }">

 

<core:Item key="{Id}" text="{Name}"/>

 

</ComboBox>

 

Any Solutions for my Problem?

 

Thanks and regards,

Sebastian

↧

Viewing full articles (6178 articles)
Browse article index

Latest Images

Trending Articles



Latest Images