cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r384191 - in /cocoon/branches/BRANCH_2_1_X: src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java status.xml
Date Wed, 08 Mar 2006 11:52:38 GMT
Author: cziegeler
Date: Wed Mar  8 03:52:35 2006
New Revision: 384191

URL: http://svn.apache.org/viewcvs?rev=384191&view=rev
Log:
Fix bug in handling multiple instances of the same portlet

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
    cocoon/branches/BRANCH_2_1_X/status.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java?rev=384191&r1=384190&r2=384191&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
Wed Mar  8 03:52:35 2006
@@ -1,12 +1,12 @@
 /*
  * Copyright 2004,2004-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -77,8 +77,7 @@
  * This is the adapter to use JSR-168 portlets as coplets
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * 
- * @version CVS $Id$
+ * @version $Id$
  */
 public class PortletAdapter 
     extends AbstractCopletAdapter
@@ -173,14 +172,10 @@
             throw new SAXException("Unable to execute JSR-168 portlets because of missing
servlet context.");
         }
         try {
-            final String portlet = (String)super.getConfiguration(coplet, "portlet");
-            if ( portlet == null ) {
-                throw new SAXException("Portlet configuration is missing.");
-            }
             // get the window
             final PortletWindow window = (PortletWindow)coplet.getTemporaryAttribute("window");
             if ( window == null ) {
-                throw new SAXException("Portlet couldn't be loaded: " + portlet);
+                throw new SAXException("Portlet couldn't be loaded: " + coplet.getId());
             }
             final Map objectModel = ContextHelper.getObjectModel(this.context);
             final ServletRequestImpl  req = (ServletRequestImpl) objectModel.get("portlet-request");
@@ -195,10 +190,10 @@
                 HtmlSaxParser.parseString(value, HtmlSaxParser.getContentFilter(contentHandler));
             } else {
                 // stream out the include for the serializer
-                IncludingHTMLSerializer.addPortlet(portlet, value);
+                IncludingHTMLSerializer.addPortlet(coplet.getId(), value);
                 contentHandler.startPrefixMapping("portal", IncludingHTMLSerializer.NAMESPACE);
                 AttributesImpl attr = new AttributesImpl();
-                attr.addCDATAAttribute("portlet", portlet);
+                attr.addCDATAAttribute("portlet", coplet.getId());
                 contentHandler.startElement(IncludingHTMLSerializer.NAMESPACE, 
                                             "include", "portal:include", attr);
                 contentHandler.endElement(IncludingHTMLSerializer.NAMESPACE, 
@@ -414,4 +409,7 @@
         }
     }
 
+    protected String getResponse(HttpServletResponse response) {
+        return response.toString();
+    }
 }

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=384191&r1=384190&r2=384191&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Wed Mar  8 03:52:35 2006
@@ -180,6 +180,10 @@
   <release version="@version@" date="@date@">
 -->
   <release version="2.1.9" date="TBD">
+    <action dev="CZ" type="fix">
+      Portal Block: Fix handling of several instances of the same portlet where all instances
+                    showed the contents of the last portlet instance.
+    </action>
     <action dev="JBQ" type="fix" fixes-bug="COCOON-1707" due-to="Sébastien Grimault"
due-to-email="sgrimault@jouve.fr">
       Allow configuration of initial context in LDAPTransformer.  Example:
       &lt;ldap:initial-context name="com.sun.jndi.ldap.connect.timeout" value="5000"/&gt;



Mime
View raw message