cancel
Showing results for 
Search instead for 
Did you mean: 

Bind table rows using $expand

xyla
Participant
0 Kudos

Hi All,

A have a table, and in my controller I'm binding the rows of the table this way:


searchResultTable.bindRows("/OrderHeaderSet", null,

  null, filterArray, {"expand":"StatusSet"});

Everithing works fine (i get the filtered dataset), except the "StatusSet" node is not expanded, and so it has no data inside.

How can I tell the "bindRows" method to expand this entity? (Obviously my approach doesn't work)

Best Regards,

Szilamér

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

searchResultTable.bindRows(

{

  path : "/OrderHeaderSet",

  filters : filterArray,

  parameters : { "expand":"StatusSet"}

} ); 

Answers (1)

Answers (1)

mauriciolauffer
Contributor
0 Kudos

I haven't used in JS yet, but my XML was something like this:


<List items="{path:'/HeaderSet', parameters:{expand : 'HeaderToItem'}, filters : [{

             path:'somefield1', operator:'EQ', value1:true}]}">

    <items>

        <ObjectListItem title="{somefield2}">

            <firstStatus>

                <ObjectStatus text="{HeaderToItem/anotherfield}" />

            </firstStatus>

        </ObjectListItem>

    </items>

</List>

You just need to adapt. You can also check the links below:

How to load odata json with $expand parameter a... | SCN

Binding problem with Master/Detail in SAP UI 5 ... | SCN