Author: hoang_to
Date: 2009-11-09 23:15:32 -0500 (Mon, 09 Nov 2009)
New Revision: 537
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/OrganizationUtils.java
Log:
GTNPORTAL-217: Bug on Logo portlet
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/OrganizationUtils.java
===================================================================
---
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/OrganizationUtils.java 2009-11-10
00:15:24 UTC (rev 536)
+++
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/OrganizationUtils.java 2009-11-10
04:15:32 UTC (rev 537)
@@ -33,6 +33,8 @@
public class OrganizationUtils
{
+ private static String cachedGroupLabel;
+
static public String getGroupLabel(String groupId) throws Exception
{
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
@@ -40,8 +42,12 @@
OrganizationService orgService =
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
Group group = orgService.getGroupHandler().findGroupById(groupId);
+ if(group == null){
+ return cachedGroupLabel;
+ }
String label = group.getLabel();
- return (label != null && label.trim().length() > 0) ? label :
group.getGroupName();
+ cachedGroupLabel = (label != null && label.trim().length() > 0 )? label
: group.getGroupName();
+ return cachedGroupLabel;
}
}
Show replies by date