diff --git a/bundles/io/org.eclipse.smarthome.io.rest.sitemap/src/main/java/org/eclipse/smarthome/io/rest/sitemap/SitemapSubscriptionService.java b/bundles/io/org.eclipse.smarthome.io.rest.sitemap/src/main/java/org/eclipse/smarthome/io/rest/sitemap/SitemapSubscriptionService.java index 15ca9483b53..c65694b85bc 100644 --- a/bundles/io/org.eclipse.smarthome.io.rest.sitemap/src/main/java/org/eclipse/smarthome/io/rest/sitemap/SitemapSubscriptionService.java +++ b/bundles/io/org.eclipse.smarthome.io.rest.sitemap/src/main/java/org/eclipse/smarthome/io/rest/sitemap/SitemapSubscriptionService.java @@ -281,9 +281,11 @@ public void modelChanged(String modelName, EventType type) { for (Entry listenerEntry : pageChangeListeners.entrySet()) { String sitemapWithPage = listenerEntry.getKey(); String sitemapName = extractSitemapName(sitemapWithPage); + String pageId = extractPageId(sitemapWithPage); if (sitemapName.equals(changedSitemapName)) { - listenerEntry.getValue().sitemapContentChanged(); + EList widgets = collectWidgets(sitemapName, pageId); + listenerEntry.getValue().sitemapContentChanged(widgets); } } } diff --git a/bundles/io/org.eclipse.smarthome.io.rest.sitemap/src/main/java/org/eclipse/smarthome/io/rest/sitemap/internal/PageChangeListener.java b/bundles/io/org.eclipse.smarthome.io.rest.sitemap/src/main/java/org/eclipse/smarthome/io/rest/sitemap/internal/PageChangeListener.java index 1a873657819..3848cba841f 100644 --- a/bundles/io/org.eclipse.smarthome.io.rest.sitemap/src/main/java/org/eclipse/smarthome/io/rest/sitemap/internal/PageChangeListener.java +++ b/bundles/io/org.eclipse.smarthome.io.rest.sitemap/src/main/java/org/eclipse/smarthome/io/rest/sitemap/internal/PageChangeListener.java @@ -257,7 +257,9 @@ private boolean definesVisibilityOrColor(Widget w, String name) { return false; } - public void sitemapContentChanged() { + public void sitemapContentChanged(EList widgets) { + updateItemsAndWidgets(widgets); + SitemapChangedEvent changeEvent = new SitemapChangedEvent(); changeEvent.pageId = pageId; changeEvent.sitemapName = sitemapName;