cancel
Showing results for 
Search instead for 
Did you mean: 

Binding oData into table(sap.m.table) in SAPUI5

arindam_samanta
Participant
0 Kudos

Hi,

I need the full guide for the oData binding in to table for mobile apps in SAPUI5. Kindly provide full concepts for this. How to bind the oData into sap.m.table in SAPUI5?

Kindly provide the example for this topic with details. So I can able understand the whole process flow for binding the oData into sap.m.table in SAPUI5.

Thanks & Regards,

Arindam Samanta.

Accepted Solutions (1)

Accepted Solutions (1)

rauf_shaikh
Active Participant
0 Kudos

Hi Arindam,

It depends on your need. You can bind table using bindAggregation() as follows:


this.getView().byId("tableId").bindAggregation("items","/oDataEntitysetURL",new sap.m.ColumnListItem(){

     cells : [

          new sap.m.Text({

               text : "{bindHere}"

          })

     ]

})

or if your entityset URL is fixed you can directly set it in your as follows:


<Table id="idProductsTable"

        inset="false"

        items="{

          path: '/entitySetURL'

        }">

        <headerToolbar>

          <Toolbar>

            <Label text="Products"></Label>

          </Toolbar>

        </headerToolbar>

        <columns>

          <Column

            width="12em">

            <Label text="Product" />

          </Column>

        </columns>

        <items>

          <ColumnListItem>

            <cells>

              <ObjectIdentifier

                title="{Name}"

                text="{Product}" />

            </cells>

          </ColumnListItem>

        </items>

</Table>

Please refer demokit for bindAggregation() detailed document with example:

SAPUI5 SDK - Demo Kit

arindam_samanta
Participant
0 Kudos

Hi Rauf,

Thanks for your reply. Its very helpful for me. I am now able to bind.

Thanks & Regards,

Arindam Samanta.

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos
arindam_samanta
Participant
0 Kudos

Hi Chandrashekhar,

Thank you very much for you reply. Its a very good example.

Regards,

Arindam Samanta.

ChandraMahajan
Active Contributor
0 Kudos

Hi Arindam,

is your question got answered? if yes then you can close the thread by marking correct answer if not then you can ask for more specific details.

Regards,

Chandra