Change text of read only message.

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

Change text of read only message.

Post 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
cristi_talau
Posts: 495
Joined: Thu Sep 04, 2014 4:22 pm

Re: Change text of read only message.

Post 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
nstensland
Posts: 21
Joined: Wed Jan 16, 2019 5:16 am

Re: Change text of read only message.

Post 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
cristi_talau
Posts: 495
Joined: Thu Sep 04, 2014 4:22 pm

Re: Change text of read only message.

Post 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-
cristi_talau
Posts: 495
Joined: Thu Sep 04, 2014 4:22 pm

Re: Change text of read only message.

Post 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
Post Reply