diff -r 7beddc62a388 -r 4eeed820fd3a svghmi/widgets_common.ysl2 --- a/svghmi/widgets_common.ysl2 Thu Mar 19 11:32:20 2020 +0100 +++ b/svghmi/widgets_common.ysl2 Thu Mar 19 19:23:56 2020 +0100 @@ -17,9 +17,10 @@ | "«@id»": { | type: "«$widget/@type»", | args: [ - foreach "$widget/arg" + foreach "$widget/arg" | "«@value»"`if "position()!=last()" > ,` | ], + | offset: 0, | indexes: [ foreach "$widget/path" { choose { @@ -34,9 +35,17 @@ | ], | element: id("«@id»"), apply "$widget", mode="widget_defs" with "hmi_element","."; + apply "$widget", mode="widget_subscribe" with "hmi_element","."; | }`if "position()!=last()" > ,` } +// default : normal subscribing +template "widget", mode="widget_subscribe" { + | sub: subscribe, + | unsub: unsubscribe, +} +// page aren't subscribers +template "widget[@type='Page']", mode="widget_subscribe"; function "defs_by_labels" { param "labels","''";