cancel
Showing results for 
Search instead for 
Did you mean: 

Master-Detail Data Binding

draschke
Active Contributor
0 Kudos

Hi All,

I try to understand the data-binding of the new Master-Detail App (up 1.30).

I have a data model with two entitytypes (Patient - Labor).

The debugger shows me the right contextPath, but I don't understand where this mapping of this two entities happens.

Binding context

  • contextPath: "/Labor(LaborID=51622,PatientID=974)"

Would be really nice, if someone could give me helpful hints!

The sap template Master-Detail I'm using:

Binding context

  • contextPath: "/Labor(LaborID=51622,PatientID=974)"

BR

Accepted Solutions (1)

Accepted Solutions (1)

karthikarjun
Active Contributor
0 Kudos

It is context binding. Before this you would have to refer: Data Binding - SAPUI5: UI Development Toolkit for HTML5 - SAP Library

Context Binding: is a reference to a data object in a model.

Here they mention the selected context of records and bind the same path to view or controls.

Regards,

Karthik A

draschke
Active Contributor
0 Kudos

Hi Karthik,

thanks for this very helpful link, but it doesn't help me at this moment.

I'm still try to understand where the data from the second entitytype (Labor) comes from.

"Context Binding: is a reference to a data object in a model."

Maybe I found it.:

Within the data object I see the data for the patient (master-entitytype).

Furthermore there is an other object with a link:

URL: ....../PATIENT(236)/PATIENT

If I call this link directly, I get an result with the second entitytype (Labor) and I could find the mapped fields which I could see in the debugger:

        "Labor(LaborID=12775,PatientID=236)"

Is this the reference, how we get the data of the associated entitytypes loaded?

(For testing I'm using an xsodata-service with an association of Patient and Labor.)

If I'm wrong with my assumption, please let me know.

BR

Answers (0)