Skip to Content
0

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

Feb 06 at 10:44 AM

167

avatar image

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 Former Member can help as he did here.

Best regards
Gregor

10 |10000 characters needed characters left characters exceeded

Mariana Naboka can you please take a look?

Thanks,

Michal.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mariana Naboka
Feb 06 at 03:10 PM
1

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


Show 4 Share
10 |10000 characters needed characters left characters exceeded

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

0

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

1

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

0

Hi Gregor,

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

Hope this helps.

Mariana

0