Oxygen Author Component (Applet) author mode: Manage Comment

Having trouble installing Oxygen? Got a bug to report? Post it all here.
alexandr.golovach
Posts: 19
Joined: Tue Mar 11, 2014 11:56 am

Oxygen Author Component (Applet) author mode: Manage Comment

Post by alexandr.golovach »

Hi, Oxygen guys!
I try to use author comments support and have some problems.
I have 2 editor mode - Comment and Edit. Comment mode is readOnly with possibility to create comments. For this constraint I used code

Code: Select all

getAuthorAccess().getEditorAccess().setEditable(false);
and when I use our common author action "Add Comment...", enter some comment text and push OK - CommentHighlight isn't created.

If I use setEditable(true) - it's work great.

I tried to use AuthorChangeTrackingController toggleTrackChanges() methods for support Track_Changes but it wasn't helped.

How can I fix this problem - have setEditable(false) and have possibility to create comments?

Thank you!
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Oxygen Author Component (Applet) author mode: Manage Com

Post by alex_jitianu »

Hello,

I understand that you are referring to the built-in action "Add Comment..."? I'm not sure how Add comment... should react when the document is marked as not being editable. Right now though, the action is kind of misleading: it appears enabled but it does nothing.

You can implement a review like behavior by using an AuthorDocumentFilter. From it you can reject all document modifications but the user will still be able to add comments. Such a filter implementation is available in author component startup project. Please take a look at com.oxygenxml.sdksamples.reviewer.EditModeAuthorDocumentFilter and how it is installed on the document in com.oxygenxml.sdksamples.reviewer.AuthorComponentReviewerSample.

Best regards,
Alex
alexandr.golovach
Posts: 19
Joined: Tue Mar 11, 2014 11:56 am

Re: Oxygen Author Component (Applet) author mode: Manage Com

Post by alexandr.golovach »

Thank you, Alex, very much!

I used your suggestions - it works great.

Best, Alex.
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen Author Component (Applet) author mode: Manage Com

Post by Radu »

Hi,

Just to update this thread, in Oxygen 17 when the Author editing mode is disabled, most of the actions (including the action to add comments) will be also automatically disabled.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply