cancel
Showing results for 
Search instead for 
Did you mean: 

Annotation Modeler - Annotation Structure ​Cannot read property 'attributes' of undefined

gregorw
Active Contributor
0 Kudos

Hello SAP Web IDE Team,

I'm using the SAP Web IDE Full Stack on my SCP Trial account. In the Features I've enabled the Annotation Modeler which currently shows me Version 1.31.1:

When I now clone my FioriElementsDemo Project from GitHub and try to open the annotation files with the Annotation Modeler I get the following error message:

Annotation Structure
Cannot read property 'attributes' of undefined

Running the application itself works without any issues. So I would guess the Annotation is correct as it can be interpreted by SAPUI5.

Hope for help. Perhaps zdravko.georgiev can help as he did here.

Best regards
Gregor

michal_keidar
Active Contributor
0 Kudos

maryana.naboka can you please take a look?

Thanks,

Michal.

Accepted Solutions (1)

Accepted Solutions (1)

maryana_naboka
Active Participant

Hi Gregor,

thanks for providing the project, this helped to find out the root cause of your problem.

Your localAnnotations_1.xml contains the annotation property value that is not correctly defined.

The Property Description of the annotation UI.HeaderInfo in your file contains the record of type UI.DataFieldWithNavigation,

whereas it should contain the record of type UI.DataField instead:

Please substitute the fragment

<PropertyValue Property="Description">

<Record Type="UI.DataFieldWithNavigation">

<PropertyValue Property="Value" Path="SupplierName"/>

<PropertyValue Property="Target" Path="SupplierName"/>

</Record> </PropertyValue>

with

<PropertyValue Property="Description">

<Record Type="UI.DataField">

<PropertyValue Property="Value" Path="SupplierName"/>

</Record>

</PropertyValue>

And this will fix the problem.

If you always add annotations with annotation modeler, you can avoid such problems in future.

Hope this helps

Best Regards,

Mariana

gregorw
Active Contributor
0 Kudos

Hi Mariana,

thank you for your quick help. I've made the suggested correction and it works. I've already committed the change. Is there a way that the Annotation Modeler would provide suggestions of what would be allowed?

Best regards
Gregor

maryana_naboka
Active Participant

Hi Gregor,

I'm glad I could help.

Actually Annotation Modeler already provides only those annotations and property values that are allowed by the respective OData vocabularies. The problems like the one you mention usually appear when the users edit the file manually in the code editor.

But maybe I misunderstood your request, so could you please provide more details on what exactly you'd like to be improved in Annotation Modeler?

Best Regards,

Mariana

gregorw
Active Contributor
0 Kudos

Hi Mariana,

great that Annotation Modeler already supports what I've asked for. But now I run into a new issue. Can you please have a look at Issue in SAP Web IDE Annotation Modeler with UI.SelectionVariant. Thanks.

Best regards
Gregor

maryana_naboka
Active Participant
0 Kudos

Hi Gregor,

answered in SAP Web IDE Annotation Modeler with UI.SelectionVariant.

Hope this helps.

Mariana

Answers (0)