Skip to Content
0
P N
Jun 24, 2015 at 11:15 AM

SAPUI5: Uncaught TypeError: c.getPath is not a function

1068 Views

Hello Experts,

I try to bind data in an array to a list and table as in 10 SAP exercise document

However, I face the issue Uncaught TypeError: c.getPath is not a function and No data is found on either the list or table. Any idea is appreciated. Thank you very much.

My xml code

<ObjectHeader title="{MaterialId}">
<attributes>
<ObjectAttribute text="{Name}" /> //it binds successfully
</attributes>
</ObjectHeader>

<List id="classList" mode="{device>/listMode}" itemPress="handleListSelect" items="{Classification}"> //no data found
<ObjectListItem type="Active" press="handleListItemPress" title="{ClassId}">
</ObjectListItem>
</List>

My navigate and binding code

var context = evt.getParameter("listItem").getBindingContext().getObject();
this.nav.to("MaterialDetail", context);

/////

var page = app.getPage(pageId);

console.log(context);

page.setBindingContext(context);

My context:

Attachments

screenshot.jpg (13.6 kB)