Display not refreshing when undoing attribute updates
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 83
- Joined: Wed May 20, 2009 1:18 pm
Display not refreshing when undoing attribute updates
Hi,
I think I have found a bug in the 10.3 version, and just wanted to check it was on your radar (or possibly even fixed already), and also would like some advise about a work around given I am restricted to 10.3.
If you display an attribute value in author mode using the CSS property "content: attr(<some attribute name>);" and then update that attribute value via the API using AuthorDocumentController.setAttribute() and then undo the update action, the display doesn't refresh to show the old value of the attribute. If you manually force a refresh (say by changing the style sheet) the old value then displays correctly.
Can you suggest a way in which I can force a display refresh (with authorAccess.getEditorAccess().refresh(); maybe?) when the user triggers an undo event?
Thanks,
Simon.
I think I have found a bug in the 10.3 version, and just wanted to check it was on your radar (or possibly even fixed already), and also would like some advise about a work around given I am restricted to 10.3.
If you display an attribute value in author mode using the CSS property "content: attr(<some attribute name>);" and then update that attribute value via the API using AuthorDocumentController.setAttribute() and then undo the update action, the display doesn't refresh to show the old value of the attribute. If you manually force a refresh (say by changing the style sheet) the old value then displays correctly.
Can you suggest a way in which I can force a display refresh (with authorAccess.getEditorAccess().refresh(); maybe?) when the user triggers an undo event?
Thanks,
Simon.
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display not refreshing when undoing attribute updates
Hi Simon,
Does this issue also happen when you change the attribute using the "Attributes" view and then undo?
I seem to remember there was such a problem but I cannot reproduce it, even in Oxygen 10.3. Can you give me a small XML+CSS sample?
As a workaround I think you can get the AuthorDocumentController, add a document listener:
and overwrite the:
Then in the overwritten method call from the AuthorEditorAccess the refresh method:
The changed node can be found out from the AttributeChangedEvent.
Regards,
Radu
Does this issue also happen when you change the attribute using the "Attributes" view and then undo?
I seem to remember there was such a problem but I cannot reproduce it, even in Oxygen 10.3. Can you give me a small XML+CSS sample?
As a workaround I think you can get the AuthorDocumentController, add a document listener:
Code: Select all
void addAuthorListener(AuthorListener listener);
Code: Select all
void attributeChanged(AttributeChangedEvent e);
Code: Select all
void refresh(AuthorNode authorNode);
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display not refreshing when undoing attribute updates
We fixed an issue like this when the attribute had a namespace or when it was matched from the CSS like *|attrName.
Does this resemble your case?
Does this resemble your case?
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 83
- Joined: Wed May 20, 2009 1:18 pm
Re: Display not refreshing when undoing attribute updates
Yes the issue occurs if you edit the attribute via the attributes editor.
A sample XML document that reproduces this error is:
and the CSS file is:
If you change the attribute value via the in-built attribute editor the value does not change either when you edit it, or when you undo an edit. To force the display to change, either re-associate the XML with the CSS or make a content change (add and then remove a space will do) in text mode and then flip back to author mode. I was aware of the problem of the value not updating when edited via the in-built editor and have created a new attribute editor operation which forces a refresh. I was not previously aware of the undo problem.
Thanks for the recomended work around, I will implement this.
Simon.
A sample XML document that reproduces this error is:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="sample.css"?>
<report>
<paragraph-group>
<paragraph id="87b7f1f3-582f-4547-9c09-ac54fe3c2e0d" para-number="20">
<para>Some paragraph text</para>
</paragraph>
</paragraph-group>
</report>
Code: Select all
report{
font-family:sans-serif;
border-style: solid;
border-width: 2px;
border-color: black;
margin: 10px;
padding: 10px;
display:block;
margin-bottom: 2px;
}
[para-number]:before{
display:block;
content: attr(para-number);
font-weight:bold;
font-size:larger;
}
Thanks for the recomended work around, I will implement this.
Simon.
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display not refreshing when undoing attribute updates
Hi Simon,
Actually this was fixed in the Oxygen 11.0 release because of a previous post you had:
http://www.oxygenxml.com/forum/topic4228.html
Regards,
Radu
Actually this was fixed in the Oxygen 11.0 release because of a previous post you had:
http://www.oxygenxml.com/forum/topic4228.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display not refreshing when undoing attribute updates
I think the only workaround which will work on your part is to call refresh on the changed element's parent when the attribute changes.
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 83
- Joined: Wed May 20, 2009 1:18 pm
Re: Display not refreshing when undoing attribute updates
I had a feeling this undo issue would be related to the update issue you referenced (http://www.oxygenxml.com/forum/topic4228.html).
Thanks for the info.
Thanks for the info.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service