portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dettb...@apache.org
Subject svn commit: r604065 - /portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java
Date Thu, 13 Dec 2007 23:34:45 GMT
Author: dettborn
Date: Thu Dec 13 15:34:39 2007
New Revision: 604065

URL: http://svn.apache.org/viewvc?rev=604065&view=rev
Log:
add support for portlets with no portlet mode in the portlet.xml

Modified:
    portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java?rev=604065&r1=604064&r2=604065&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java
Thu Dec 13 15:34:39 2007
@@ -111,11 +111,17 @@
                     Iterator i2 = dd.getSupports().iterator();
                     while(i2.hasNext()) {
                         SupportsDD sd = (SupportsDD)i2.next();
-                        Iterator pd = sd.getPortletModes().iterator();
-                        while(pd.hasNext()) {
-                            if(mode.equalsIgnoreCase((String)pd.next())) {
-                                return true;
-                            }
+                        if (sd.getPortletModes()==null){
+                        	if (mode.equalsIgnoreCase(PortletMode.VIEW.toString()))
+                        		return true;
+                        }
+                        else{
+	                        Iterator pd = sd.getPortletModes().iterator();
+	                        while(pd.hasNext()) {
+	                            if(mode.equalsIgnoreCase((String)pd.next())) {
+	                                return true;
+	                            }
+	                        }
                         }
                     }
                 }



Mime
View raw message