• RefreshUI() in Automation

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #41096  by khpavel
 
Hello!

My script changes folder style on property value. But new icon will be shown only after some user action. For example choosing new folder.
So I decided to refresh UI from script. But GeneralComunicator.RefreshUI() doesn't work.
Script returns error "Attempt to resolve method: RefreshUI() on undefined variable or class name: GeneralComunicator"
"import com.openkm.frontend.client.extension.comunicator.GeneralComunicator;" included in script

How can I refresh user interface from automation script?
 #41102  by jllort
 
Actually is not possible call from server side ( automation and core ) GWT methods. Can be called on javascript scenario. Should be needed extending OpenKM features to allowing it. If you are changing folder styles are professional customer no ? I would like understanding better your scenario, all the steps involved on creating or updating a new document. Some screenshots are wellcome. If you are a OpenKM supported customer can ask us directly from OpenKM website support.
 #41108  by khpavel
 
My company is potential OpenKM customer. Now we use OpenKN Prof trial.

The scenario of changing folder styles is (simplified):
1. there is hierarhical folder structure. For example
- Folder1
- - Folder11
- - -Folder111
- - -Folder112
- - Fodler12
- - -Folder121
- - -Folder122
2. every folder has metadata "Status" with checkbox field "Status".
3. if user changes Status to true, style of current folder and ALL PARENT folders changes to "Green bullet". For example, if user changes Status to true for Folder112, folders Folder112, Folder11, Folder1 must be changed style to "Green bullet"
4. if user changes Status to false, style of current folder and ALL PARENT folders changes to "Red bullet". For example, if user changes Status to false for Folder122, folders Folder122, Folder12, Folder1 must be changed style to "Red bullet"

The problem is that after scrtipt finished user doesn't see new folder icons until he click on EVERY changed folder
 #41116  by jllort
 
We should study the changes to be done in source code for this enhancement. Seems in your logic you have an automation property group event what changes folder styles, unfortunatelly now there's no way to connect automation events with UI methods like refreshing UI. Will be necessary to study the whole scenario not only focused in solving your problem but also considering similar cases including yours.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.