PageOffice files realize concurrency control

The PageOffice development platform is a software for online editing of Office documents produced by Beijing Zhuozheng Zhiyuan Software Company. It is inevitable that multiple people will modify the same document. In this case, concurrent control of file permissions is necessary To prevent simultaneous modification.

1. How to achieve concurrency control

PageOfficeCtrl poCtrl = new PageOfficeCtrl(request);
PageOfficeCtrl1.TimeSlice = 4;
  • Set the attribute TimeSlice before WebOpen, as shown above, the editing time for this document by the logged-in user is 4 minutes.
  • The user must perform operations such as editing and saving before the end of the editing time. After the end of the editing time, the unsaved content that the user has edited cannot be saved.
  • TimeSlice is only valid for the document currently opened by WebOpen. If no value is assigned, no concurrency control is performed. The default value is 0, which means no concurrency control.

2. When editing a document, display a countdown

poCtrl.setTitlebar(false); //隐藏标题栏
poCtrl.setMenubar(false); //隐藏菜单栏

3. The user effects are as follows

  • Effect when the first person edits
    Insert picture description here
  • Effect when the second person opens
    When someone opens a document, and others try to open it

4. Official document reference

PageOffice V4.0 from entry to master

Guess you like

Origin blog.csdn.net/DearestFriend/article/details/105671108