portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r927819 - /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
Date Fri, 26 Mar 2010 12:51:48 GMT
Author: woonsan
Date: Fri Mar 26 12:51:48 2010
New Revision: 927819

URL: http://svn.apache.org/viewvc?rev=927819&view=rev
Log:
JS2-1159: Fixing the problem that page decorator drop downlist has duplicate items.
(This was mainly caused by using wrong member variable during initializing theme list.)

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java?rev=927819&r1=927818&r2=927819&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
Fri Mar 26 12:51:48 2010
@@ -164,15 +164,15 @@ public class PortalSiteManager extends A
 
     private MenuDefinition menuDefinition;
 
-    private static List<String> pageDecoraters;
+    private List<String> pageDecorators;
 
-    private static List<String> portletDecorators;
+    private List<String> portletDecorators;
 
-    private static List<String> pageThemes;
+    private List<String> pageThemes;
 
-    private static List<String> constraintsDefs;
+    private List<String> constraintsDefs;
 
-    private static List<String> targetList;
+    private List<String> targetList;
 
     private final static String ADD_ACTION = "add";
 
@@ -3350,43 +3350,25 @@ public class PortalSiteManager extends A
     {
         if (portletDecorators == null)
         {
-            portletDecorators = new ArrayList<String>();
-            Iterator iterator = getServiceLocator().getDecorationFactory()
-                    .getPortletDecorations(null).iterator();
-            while (iterator.hasNext())
-            {
-                portletDecorators.add((String) iterator.next());
-            }
+            portletDecorators = new ArrayList<String>(getServiceLocator().getDecorationFactory().getPortletDecorations(null));
         }
         return portletDecorators;
     }
 
     private List<String> getPageDecorators()
     {
-        if (pageDecoraters == null)
+        if (pageDecorators == null)
         {
-            pageDecoraters = new ArrayList<String>();
-            Iterator iterator = getServiceLocator().getDecorationFactory()
-                    .getPageDecorations(null).iterator();
-            while (iterator.hasNext())
-            {
-                pageDecoraters.add((String) iterator.next());
-            }
+            pageDecorators = new ArrayList<String>(getServiceLocator().getDecorationFactory().getPageDecorations(null));
         }
-        return pageDecoraters;
+        return pageDecorators;
     }
 
     private List<String> getThemes()
     {
         if (pageThemes == null)
         {
-            pageThemes = new ArrayList<String>();
-            Iterator iterator = getServiceLocator().getDecorationFactory()
-                    .getDesktopPageDecorations(null).iterator();
-            while (iterator.hasNext())
-            {
-                pageDecoraters.add((String) iterator.next());
-            }
+            pageThemes = new ArrayList<String>(getServiceLocator().getDecorationFactory().getDesktopPageDecorations(null));
         }
         return pageThemes;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message