Skip to Content
0
Oct 22, 2017 at 08:51 PM

SAPUI5 views, accessing model item for Panel header

115 Views

have the following model.

categories [
1: {
    0:{}
    1:{}
    categoryDesc: "Production"
}

2: {
    0:{}
    1:{}
    2:{}
    categoryDesc: "Documentation    
}
]

And the following view..

<List id="idList" items="{view>/categories}">
                    <items>
                        <CustomListItem>
                            <Panel expandable="true" expanded="false" headerText="{categoryDesc}">
                                <content>

                                </content>
                            </Panel>
                        </CustomListItem>
                    </items>
                </List>

The Issue is, the correct number of panels are being displayed (2), but categoryDesc is not being displayed.

So "view/>categories" is picking up array element 1 and 2 fine, i just can't retrieve the categoryDesc.

Any ideas?