Browse Source

Property change of the UI service updates the properties of the Portlet

In response to property change the properties
tags/8.1.0.alpha7
Mirjan Merruko 7 years ago
parent
commit
2c7c72b098

+ 14
- 0
liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java View File

@@ -182,6 +182,20 @@ class PortletUIServiceTrackerCustomizer
@Override
public void modifiedService(ServiceReference<UI> serviceReference,
ServiceObjects<UI> 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<String, Object> newProperties = createPortletProperties(
serviceReference);
ServiceRegistration<Portlet> registration = portletRegistrations
.get(serviceReference);
if (registration != null) {
registration.setProperties(newProperties);
}
}

@Override

Loading…
Cancel
Save