I have a pair of entities with a 1:n relation. For example an OrderHeader and an OrderLine. I use a REST service to provide me data for several orders and the lines for each order.
I intend to build a list of collapsible orders, with oj-collapsible and have no problems with that. Now for each order, I am using a oj-navigation-list with a template to get data from each line and show the lines as navigable items. For the navigation list, how do I create the dataProvider?
I tried this:
<oj-navigation-list id="activitiesList" drill-mode="none" data="[[{
new ArrayDataProvider(order.data.lines, {keyAttributes:'code'});
}()]]">
<template slot="itemTemplate" data-oj-as="line">
................................................
</template>
</oj-navigation-list>
I cannot get past this because the framework cannot parse the expression inside.
What mistake am I making? Is expression binding even allowed? What is the correct method?
Please help..
Rahul