Page 1 of 1

Oxygen Author Component (Applet) author mode: Manage Comment

Posted: Mon Apr 14, 2014 6:27 pm
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!

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

Posted: Tue Apr 15, 2014 3:31 pm
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

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

Posted: Thu Apr 17, 2014 1:51 pm
by alexandr.golovach
Thank you, Alex, very much!

I used your suggestions - it works great.

Best, Alex.

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

Posted: Tue May 19, 2015 2:18 pm
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