From 2c7c72b098ac494b11aec92faa0784ea7c063edb Mon Sep 17 00:00:00 2001 From: Mirjan Merruko Date: Tue, 11 Apr 2017 15:38:12 +0300 Subject: Property change of the UI service updates the properties of the Portlet In response to property change the properties --- .../osgi/liferay/PortletUIServiceTrackerCustomizer.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java index d985f55352..1353a735b5 100644 --- a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java +++ b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java @@ -182,6 +182,20 @@ class PortletUIServiceTrackerCustomizer @Override public void modifiedService(ServiceReference serviceReference, ServiceObjects ui) { + /* + * This service has been registered as a portlet at some point, + * otherwise it wouldn't be tracked. + * + * This handles changes for Portlet related properties that are part of + * the UI service to be passed to the Portlet service registration. + */ + Dictionary newProperties = createPortletProperties( + serviceReference); + ServiceRegistration registration = portletRegistrations + .get(serviceReference); + if (registration != null) { + registration.setProperties(newProperties); + } } @Override -- cgit v1.2.3