Author: kien_nguyen
Date: 2011-05-18 03:12:47 -0400 (Wed, 18 May 2011)
New Revision: 6479
Modified:
portal/branches/branch-showinfobar/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
Log:
GTNPORTAL-1558 change how to get portalConfig
Modified:
portal/branches/branch-showinfobar/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
---
portal/branches/branch-showinfobar/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2011-05-18
04:50:59 UTC (rev 6478)
+++
portal/branches/branch-showinfobar/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2011-05-18
07:12:47 UTC (rev 6479)
@@ -21,12 +21,14 @@
import org.exoplatform.application.registry.Application;
import org.exoplatform.portal.application.PortalRequestContext;
+import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserACL;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.ApplicationState;
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.CloneApplicationState;
import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.TransientApplicationState;
import org.exoplatform.portal.webui.application.PortletState;
import org.exoplatform.portal.webui.application.UIPortlet;
@@ -334,9 +336,10 @@
uiPortlet.setShowEditControl(true);
//TODO Wait to fix issue EXOGTN-213 and then
- //we should get "showInfobar" from current UI portal
- UserPortalConfigService service =
uiApp.getApplicationComponent(UserPortalConfigService.class);
-
uiPortlet.setShowInfoBar(service.getUserPortalConfig(pcontext.getPortalOwner(),
pcontext.getRemoteUser()).getPortalConfig().isShowInfobar());
+ //we should get "showInfobar" from current UI portal instead of
Storage service
+ UIPortal currentPortal = Util.getUIPortal();
+ DataStorage storage = uiApp.getApplicationComponent(DataStorage.class);
+
uiPortlet.setShowInfoBar(storage.getPortalConfig(currentPortal.getOwnerType(),
currentPortal.getOwner()).isShowInfobar());
uiSource = uiPortlet;
}
List<UIComponent> children = uiTarget.getChildren();