Attributes deleted

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 142
Joined: Fri Jan 20, 2017 1:11 pm

Attributes deleted

Post by Isabelle »

Hello,

We use oxygen-18.1.0.0.jar, and we have a problem with attributes in a tag after an undo.

We have this tag :

Code: Select all

                  
<BlocText>
<Phr code="0162876602668Xtl" locale="fr_FR">
<text>produit décapant homologué</text>
</Phr>
</BlocText>
1°) We add a white space in the tag <text>
2°) We make an undo (Ctrl+Z)
3°) We had a new tag <FreeText/> between </Phr> and </BlocText> from the widget "Elements"

And then the attributes code and locale have been deleted.
We have not overriden the undo method.

I have tried with the version 20.0, and we still have this problem.

Have you any ideas where it comes from ?

Regards,
Isabelle
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Attributes deleted

Post by Radu »

Hi Isabelle,

So what API extensions are you using? For example did you set the "code" and "local" attributes on the element using our Attributes view or using your custom code? If you used your custom code, did you use the AuthorDocumentController to set the attributes to the element or did you set them directly on the AuthorElement? If the latter, then please use the AuthorDocumentController for all deletions and insertions of attributes on an element.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Isabelle
Posts: 142
Joined: Fri Jan 20, 2017 1:11 pm

Re: Attributes deleted

Post by Isabelle »

Hello Radu,

Thank you for your answer.
I will check that point and let you know the result.

Regards,
Isabelle
Isabelle
Posts: 142
Joined: Fri Jan 20, 2017 1:11 pm

Re: Attributes deleted

Post by Isabelle »

You were right.
We use AuthorElement to manage attribute.
I have changed it and we use now AuthorDocumentController, and it solves the problem.

Thanks a lot.
Regards,
Isabelle
Post Reply