cancel
Showing results for 
Search instead for 
Did you mean: 

Data binding issue: in bindaggregation method "nested expand"

former_member196942
Participant
0 Kudos

Hi All,

I am facing issues in binding data to the UI.

In my code snippet above, I have :

oPhysicianUserListTemplate: template for table,

Path : has the entity Physicians path.

Physicians is associated to PersonDetails and PersonDetailsDetaiils is the navigation property.

PersonDetailsDetaiils  has a property "FamilyName" which i want to use in my template.

Also the expand query gives me the below given structure:

{

d:

     {

     results: [

                    PatientDetails:{

                                        PersonDetailsDetails: {


                                                                 "FamilyName": "SomeValue"

                                                                                    }                                            

                                                 }

                    ]

          }

}

Any help will be highly appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

saivellanki
Active Contributor
0 Kudos

Hi Priya,

According to the structure, your expand parameter should be 'PatientDetails/PersonDetailsDetails' but in your code it is 'PersonDetails/PersonDetailsDetails'. ?

Same binding applies to text control binding as well.


Regards,

Sai Vellanki.

former_member196942
Participant
0 Kudos

Hi Sai,

Sorry for the confusion, the structure is as follows:

{

d:

     {

     results: [

                    PersonDetails:{

                                        PersonDetailsDetails: {


                                                                 "FamilyName": "SomeValue"

                                                                                    }                                           

                                                 }

                    ]

          }

}

saivellanki
Active Contributor
0 Kudos

Priya,

Try -


new sap.m.Text({text:"{PersonDetails/PersonDetailsDetails/0/FamilyName}"});

Also, can you try to debug and check sap.ui.getCore().getModel().getProperty("yourmodelpath") what value you are fetching?

Regards,

Sai Vellanki.

former_member183518
Active Participant
0 Kudos

I believe the expanded binding path would be, 'PatientDetails/PersonDetailsDetails/FamilyName'.

former_member196942
Participant
0 Kudos

FamilyName is a field which I have to bind it to my Text control.

former_member183518
Active Participant
0 Kudos

Yes, I was referring to the same.


new sap.m.Text({text : "{PersonDetails/PersonDetailsDetails/FamilyName}"});