cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with metadata annotation: field-control (deep entity)

Christophe_SW
Participant
0 Kudos

Hi all,
I think I might have found an issue with metadata annotations.
I'm using Attribute sap:field-control to describe the fields that are editable / mandatory / etc..
According to this page, it should be possible to refer to a deeper (expanded) entity for the field-control value, but my Smartform doesn't automatically react to these attributes Am I missing something?

Below is a collage with the different screenshots, to clarify
And this is the slack thread for the same question:
https://openui5.slack.com/archives/C0R5DSPDL/p1549031463173200

junwu
Active Contributor
0 Kudos

is the association 1:1?

Accepted Solutions (1)

Accepted Solutions (1)

Hey Christophe,

when you say that your SmartForm does not react on the given FieldControl value - I assume you mean the SmartField in your SmartForm, right?

If yes...

...it makes always sense to check the control-specific annotation documentation, as here the supported annotations in general and - in certain cases - the supported aspects are mentioned.

When you look here: https://ui5.sap.com/#/api/sap.ui.comp.smartfield.SmartField/annotations/FieldControl you can read one detail which might be the "anwer":

FieldControl

Defines the rendering of the field from a dynamic value that can be provided as a path by referencing another Property within the same EntityType.

So having a path with a navigation property in the fieldcontrol is - according to the SmartField documentation - not supported.

BR
Alex

Christophe_SW
Participant
0 Kudos

Thank you for the reply!
However I would like to point to this page, which caused my confusion in the first place.
It says: "The field-control property can be in the same type as shown above, or it can be in a nested complex type, or in an entity type that is associated 1:1."


So whether or not the nested property can be read is control-specific then?
My use-case has a lot of fields and having the rights + fields in the same entity is making the whole thing hard to read.

Hello Christophe,

long time ago...

You ask: So whether or not the nested property can be read is control-specific then?

Yes, indeed. The page you found describes the OData Specification, but doesn't reflect the real implementation. The implemented annotations (....parts of annotations...) are documented in the control-specific API Reference in the UI5 Demokit.

BR
Alex

Answers (0)