cancel
Showing results for 
Search instead for 
Did you mean: 

XML View: Binding of first element property

christoph_nagl
Participant
0 Kudos

Hi All,

I have a label on my SAP UI5 GUI and want to make a binding of the first element of my model content and a property out of this.

It's not working in that way...

<Label xmlns="sap.m" design="Standard" text="{/MAIN_OBJECTSet('1')/PROPERTY_NAME}"

  visible="true" textAlign="Begin" textDirection="Inherit" width="200px"

  required="false" labelFor="">

  </Label>

Thanks for your support.

Best regards,

Christoph

Accepted Solutions (1)

Accepted Solutions (1)

former_member293602
Active Participant
0 Kudos

Hi Christoph,

if you are using a json model, try "{/MAIN_OBJECTSet/0/PROPERTY_NAME}" as binding path. For more information on binding paths, check OpenUI5 SDK - Demo Kit.

Regards, Frank

christoph_nagl
Participant
0 Kudos

Hi Frank,

thanks for your help.

Unfortunately this is also not working :-(.

I set in the GET_ENTITY method in service implementation also a break point and method is never called when I set the binding....

Best,

Christoph

christoph_nagl
Participant
0 Kudos

Hi all,

I just tested again and now it's working...

<Label xmlns="sap.m" design="Standard" text="{/MAIN_OBJECTSet('1')/PROPERTY_NAME}"

  visible="true" textAlign="Begin" textDirection="Inherit" width="200px"

  required="false" labelFor="">

  </Label>

The relative path syntax depends on the used model!

Strange - but ok.

Thanks.

Best regards,

Christoph

Answers (0)