HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: [email protected] on April 09, 2016, 01:33:58 AM
-
How do I pass text from a automation program to a widget.. not really done much with widgets. Has anyone got any simple examples.. would like to dynamically update text from a plugin onto the widget :)
Thanks
-
No one?
-
So I managed to update the status text on my widget like this:
(program code)
Program.Parameter("MyModule.Status").Value = mesg;
(widget, RenderView)
var STATUS = HG.WebApp.Utility.GetModulePropertyByName(module, 'MyModule.Status').Value;
this.statusText.html(STATUS);
HOWEVER:
The problem I am having is that it never refreshes uinless I also have a Program.Notfy
Is there any way to force a widget to redraw on status change?
-
Answered my own question:
Program.RaiseEvent("Program.UiRefresh", "Data Updated", "");
;D
-
Your widget prob does what I want anyway!!
-
It's just the default widget with the above lines added. Have mailed it to you.
-
Thanks Chris