Skip to Content
0
May 21, 2020 at 06:10 AM

Binding of Semantic Sort Select not working

57 Views

hi Team,

Am using a semantic sort select UI element and binding a json model as shown.

/************************CODE OF XML VIEW************************************************/
<semantic:SortSelect id="masterlist" 
change="onSemanticSelectChange" 
items="{ProductModel>/ProductCollection}">
<core:Item key="{ProductModel>ProductId}" text="{ProductModel>Name}"/>
</semantic:SortSelect>
/************************CODE OF XML VIEW************************************************/
/************************CODE OF XML CONTROLLER************************************************/
var ProductModel = new sap.ui.model.json.JSONModel(
jQuery.sap.getModulePath("foldername","/mockdata/products.json")
);
g_var_HomeViewPointer.getView().setModel(ProductModel,"ProductModel");
/************************CODE OF XML CONTROLLER************************************************/
/************************JSON FILE HAVING PRODUCTION COLLECTION IN JSORY ARRAY FORMAT************************************************/
{
"ProductCollection": [
{
"ProductId": "HT-1000",
"Category": "Laptops",
"MainCategory": "Computer Systems",
"Name": "Notebook Basic 15",
"DimUnit": "cm"
},{......},{.....}]

but in the view the Items are not shown.

Here we want to show the Product list in master.

Kinldy do the needfull.

Regards

Govardan

Attachments