Page 1 of 1

Change text of read only message.

Posted: Thu Jan 31, 2019 6:29 pm
by nstensland
Is there a way to change the text of "Someone else is currently editing this file and thus, it was opened as read-only." Sometimes this is misleading in our system because some files are just read only (never editable). We use HTTP 423 to communicate this. Is there a better way to make some files "ready-only" in Oxygen or is there a way to change the message? I have the oxyen web-dav client plugin downloaded from git and we are using a custom web-dav server if that helps.

Thanks,
Nat

Re: Change text of read only message.

Posted: Fri Feb 01, 2019 2:16 pm
by cristi_talau
Hello,

Web Author interprets some headers sent by the WebDAV server, such as: "oxygen_read_only" and "oxygen_read_only_reason".

The first one, if present signals that the file is read-only, while the second one can specify a string to be displayed on the yellow stripe.

More details here: https://www.oxygenxml.com/InstData/Edit ... NLY_HEADER .

Best,
Cristian

Re: Change text of read only message.

Posted: Fri Feb 01, 2019 7:10 pm
by nstensland
That worked great. Any way to suppress the dialog box which popups (not the yellow strip) or to change the message?

Thanks again!

-Nat

Re: Change text of read only message.

Posted: Mon Feb 04, 2019 6:13 pm
by cristi_talau
Hello,

I think you might have to implement a Java plugin to solve this issue [1]. You should register a WebappEditingSessionLifecycleListener[2] that does something like below:

Code: Select all

new WebappEditingSessionLifecycleListener() {     
@Override
public void editingSessionStarted(String sessionId, AuthorDocumentModel documentModel) {
ReadOnlyReason readOnlyReason = ((IWebappAuthorEditorAccess)documentModel.getAuthorAccess().getEditorAccess()).getReadOnlyReason();
if (isNotLocked(readOnlyReason)) {
documentModel.getMessageProvider().clearMessages();
}
}
};
Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... ugins.html
[2] https://www.oxygenxml.com/InstData/Edit ... eListener-

Re: Change text of read only message.

Posted: Mon May 27, 2019 3:09 pm
by cristi_talau
Hello,

I am updating this thread to let you know that Oxygen XML Web Author v21.1 is now released and that now the correct message is displayed when a file is opened as read-only.

Here is a list of what is new in this version: https://www.oxygenxml.com/xml_web_author/whats_new.html

Best,
Cristian