Page 1 of 1

RefreshUI() in Automation

PostPosted:Sun Dec 20, 2015 6:42 pm
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?

Re: RefreshUI() in Automation

PostPosted:Tue Dec 22, 2015 12:11 pm
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.

Re: RefreshUI() in Automation

PostPosted:Wed Dec 23, 2015 9:01 am
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

Re: RefreshUI() in Automation

PostPosted:Fri Dec 25, 2015 11:18 am
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.