Posts: 33
Threads: 8
Joined: Jul 2015
Reputation:
0
I have a situation where the custom values of an object change 'continuously'.
We can reload the vizu page by F5 to have this reflected in the vizu dropdown lists, but that's not what a user wants from the GUI
How can we make sure that the vizu gets to use the updated custom values list, without having to reload the entire vizu?
Can we for instance have a custom js that reloads that info for objects marked with a certain css tag, let's say every minute?
Cheers,
C.
Don't ask what we can do in KNX but wonder what we can't - www.KNXlogic.eu
Posts: 33
Threads: 8
Joined: Jul 2015
Reputation:
0
13.12.2022, 11:27
(This post was last modified: 13.12.2022, 11:28 by cdebackere.)
Thx for this clarification.
Is this function called at the moment the vizu-object is clicked? Or is it only called once at load of the visualization?
Because I need to force that this enum list updates after loading. In the LM, the custom values configured in the object are always kept up to date from our resident script. So it's only a matter of forcing the getEnums to update
Don't ask what we can do in KNX but wonder what we can't - www.KNXlogic.eu
Posts: 33
Threads: 8
Joined: Jul 2015
Reputation:
0
13.12.2022, 17:02
(This post was last modified: 13.12.2022, 17:05 by cdebackere.)
true, and that's what I understood. So I did test, only to find out .. that it'snot like you say. Hence my question.
You say 'each time the control is shown'.
So what I try:
1) vizu open on a page. I select a control that opens a widget popup. on that widget (which is now shown) I select to control which shows the list of custom values of the object.
2) I modify the custom values of the object in the LM
3) I close the widget, I click the control to open the widget and again select the control: list of custom values not updated to the modified ones.
So even is the widget with the custom value control is redrawn, the value list remains
Looking in the browser console: I see no activiy at all when the control is clicked to open the widget (and show the custom value control)
Don't ask what we can do in KNX but wonder what we can't - www.KNXlogic.eu
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
It won't load custom values from LM. You need to define your own logic in getEnums to provide custom values based on other object values etc.
Posts: 33
Threads: 8
Joined: Jul 2015
Reputation:
0
13.12.2022, 21:23
(This post was last modified: 13.12.2022, 21:30 by cdebackere.)
OK,
I think I get it.
I have tried a couple of things with linsteners and setInterval which works well as such.
But the thing missing is the ability to read/receive the updated enums form the LM
The grp.enums doesn't update. Also tried objectStore. and startObjectUpdate to force objectStore update. But no succes till now.
Searched the object model for 'update' and some other terms, but can't find the suited call/property.
In my case, only the LM knowns the current enums (and hence stores them in the object custom values). The GUI has no way to know them tself
Don't ask what we can do in KNX but wonder what we can't - www.KNXlogic.eu
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
As with most other object properties enumsare loaded only once when visualization page is opened. So there's no direct way of updating enums. But you can use .lp server-side scripting together with Custom JS to update enums either periodically or based on some object change.