cancel
Showing results for 
Search instead for 
Did you mean: 

Association path in ODataModel

0 Kudos

Hi all,

   Is it possible to define an association path in a table column.

   I have two EntitySets: ItemA(Aid Aname) and ItemB(Bid, Bname), a navigation property(m:m) ItemAtoItemB: Aid -> Bid

   when I display ItemA in a sap.ui.table, I also want to display the Bname in the Association.

  The table bind row like this:


oTable.bindRows({

               path:  "/ItemA",

               properties: {

                   expand: "ItemAtoItemB"

               }

            });

  The column xml view is like this(maybe several columns):


<table:Column >

         <Label text=Bname" />

              <table:template>

                    <Text text="{ItemAtoItemB[0]/Bname}" ></Text>

              </table:template>

<table:Column>

But it doesn't work. Is there some way to define the association path?

Accepted Solutions (0)

Answers (1)

Answers (1)

jamie_cawley
Active Contributor
0 Kudos

The expand parameter in your definition should allow you to do this, use the collection name not the nav path

path: '/ItemA',

parameters: {expand:'ItemB'},

The path may need to be ItemB/bname.

Regards,

Jamie

SAP - Technology RIG