You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by li...@apache.org on 2008/11/14 17:36:42 UTC

svn commit: r714063 - /geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CreatePluginIndexHandler.java

Author: linsun
Date: Fri Nov 14 08:36:42 2008
New Revision: 714063

URL: http://svn.apache.org/viewvc?rev=714063&view=rev
Log:
GERONIMO-4141 display only car types on the export plugin portlet page thanks Ivan for the patch

Modified:
    geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CreatePluginIndexHandler.java

Modified: geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CreatePluginIndexHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CreatePluginIndexHandler.java?rev=714063&r1=714062&r2=714063&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CreatePluginIndexHandler.java (original)
+++ geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/CreatePluginIndexHandler.java Fri Nov 14 08:36:42 2008
@@ -17,6 +17,8 @@
 package org.apache.geronimo.console.car;
 
 import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
 
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -46,7 +48,12 @@
 
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
         ConfigurationData[] configs = PortletManager.getConfigurations(request, null, false);
-        request.setAttribute("configurations", configs);        
+        List<ConfigurationData> carModulesList = new LinkedList<ConfigurationData>();
+        for (ConfigurationData configurationData : configs) {
+            if (configurationData.getConfigID().getType().equalsIgnoreCase("car"))
+                carModulesList.add(configurationData);
+        }
+        request.setAttribute("configurations", carModulesList.toArray(new ConfigurationData[carModulesList.size()]));
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {