Attributes deleted

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 29

Attributes deleted

Wed Apr 18, 2018 6:40 pm

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: 5459

Re: Attributes deleted

Wed Apr 18, 2018 10:07 pm

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: 29

Re: Attributes deleted

Thu Apr 19, 2018 11:51 am

Hello Radu,

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

Regards,
Isabelle
Isabelle
Posts: 29

Re: Attributes deleted

Thu Apr 19, 2018 4:48 pm

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

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 2 guests