Change text of read only message.

Are you missing a feature? Request it's implementation here.
nstensland
Posts: 21
Joined: Wed Jan 16, 2019 5:16 am

Change text of read only message.

Post by nstensland » Thu Jan 31, 2019 6:29 pm

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

cristi_talau
Posts: 217
Joined: Thu Sep 04, 2014 4:22 pm

Re: Change text of read only message.

Post by cristi_talau » Fri Feb 01, 2019 2:16 pm

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

nstensland
Posts: 21
Joined: Wed Jan 16, 2019 5:16 am

Re: Change text of read only message.

Post by nstensland » Fri Feb 01, 2019 7:10 pm

That worked great. Any way to suppress the dialog box which popups (not the yellow strip) or to change the message?

Thanks again!

-Nat

cristi_talau
Posts: 217
Joined: Thu Sep 04, 2014 4:22 pm

Re: Change text of read only message.

Post by cristi_talau » Mon Feb 04, 2019 6:13 pm

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-

cristi_talau
Posts: 217
Joined: Thu Sep 04, 2014 4:22 pm

Re: Change text of read only message.

Post by cristi_talau » Mon May 27, 2019 3:09 pm

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

Post Reply