Author: thomas.heute(a)jboss.com
Date: 2010-02-11 16:32:06 -0500 (Thu, 11 Feb 2010)
New Revision: 1649
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
Log:
GTNPORTAL-635: When there is no portlet-skin for a given name, try to fallback to Default
"Default" is hardcoded here
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-02-11
20:32:33 UTC (rev 1648)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-02-11
21:32:06 UTC (rev 1649)
@@ -345,10 +345,10 @@
this.skin_ = skin;
}
- private SkinConfig getSkin(String module)
+ private SkinConfig getSkin(String module, String skin)
{
SkinService skinService = getApplicationComponent(SkinService.class);
- return skinService.getSkin(module, skin_);
+ return skinService.getSkin(module, skin);
}
/**
@@ -385,6 +385,10 @@
for (UIPortlet uiPortlet : uiportlets)
{
SkinConfig skinConfig = getPortletSkinConfig(uiPortlet);
+ if (skinConfig == null)
+ {
+ skinConfig = getDefaultPortletSkinConfig(uiPortlet);
+ }
if (skinConfig != null && !portletConfigs.contains(skinConfig))
{
skins.add(skinConfig);
@@ -395,12 +399,25 @@
return skins;
}
+ private SkinConfig getDefaultPortletSkinConfig(UIPortlet portlet)
+ {
+ String portletId = portlet.getSkinId();
+ if (portletId != null)
+ {
+ return getSkin(portletId, "Default");
+ }
+ else
+ {
+ return null;
+ }
+ }
+
private SkinConfig getPortletSkinConfig(UIPortlet portlet)
{
String portletId = portlet.getSkinId();
if (portletId != null)
{
- return getSkin(portletId);
+ return getSkin(portletId, skin_);
}
else
{
Show replies by date