Change text of read only message.

Are you missing a feature? Request it's implementation here.
nstensland
Posts: 13

Change text of read only message.

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: 190

Re: Change text of read only message.

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: 13

Re: Change text of read only message.

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: 190

Re: Change text of read only message.

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-

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 0 guests