cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r326427 - in /cocoon: blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/ blocks/portal/trunk/ blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/ trunk/
Date Wed, 19 Oct 2005 07:22:07 GMT
Author: cziegeler
Date: Wed Oct 19 00:21:56 2005
New Revision: 326427

URL: http://svn.apache.org/viewcvs?rev=326427&view=rev
Log:
Portal block: Fix history aspect when coplets are used.
Portal block: Add title to basket item in the portal sample.

Modified:
    cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java
    cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/BasketTransformer.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/HistoryAspect.java
    cocoon/blocks/portal/trunk/status.xml
    cocoon/trunk/status.xml

Modified: cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java?rev=326427&r1=326426&r2=326427&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java
(original)
+++ cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/AddToBasketAspect.java
Wed Oct 19 00:21:56 2005
@@ -67,7 +67,7 @@
     }
 
     /**
-     * @see org.apache.cocoon.portal.layout.renderer.RendererAspect#toSAX(org.apache.cocoon.portal.layout.renderer.RendererAspectContext,
org.apache.cocoon.portal.layout.Layout, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler)
+     * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#toSAX(org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext,
org.apache.cocoon.portal.layout.Layout, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler)
      */
     public void toSAX(RendererAspectContext context,
                       Layout layout,

Modified: cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/BasketTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/BasketTransformer.java?rev=326427&r1=326426&r2=326427&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/BasketTransformer.java
(original)
+++ cocoon/blocks/portal-sample/trunk/java/org/apache/cocoon/portal/coplets/basket/BasketTransformer.java
Wed Oct 19 00:21:56 2005
@@ -111,6 +111,12 @@
                     ci = new ContentItem(cid, addContent);
                 }
 
+                // if a title is present set the title
+                final String title = attr.getValue("title");
+                if(title!=null) {
+                    ci.setTitle(title);
+                }
+                
                 // do we want to add the content to the basket or to the briefcase
                 final ContentStore store;
                 final String storeName = (attr.getValue("store") == null ? this.defaultStoreName
: attr.getValue("store"));

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/HistoryAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/HistoryAspect.java?rev=326427&r1=326426&r2=326427&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/HistoryAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/HistoryAspect.java
Wed Oct 19 00:21:56 2005
@@ -24,6 +24,7 @@
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.Session;
 import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.portal.acting.helpers.CopletEventDescription;
 import org.apache.cocoon.portal.acting.helpers.LayoutEventDescription;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
 import org.apache.cocoon.portal.layout.Layout;
@@ -59,17 +60,26 @@
      * @param id
      * @param state
      * @param values
+     * @param isCopletEvent tells if the event has to be a coplet event 
      */
-    protected void addValues(String id, List state, Map values, String prefix) {
+    protected void addValues(String id, List state, Map values, String prefix,boolean isCopletEvent)
{
         final Iterator iter = values.entrySet().iterator();
         while ( iter.hasNext() ) {
             final Map.Entry entry = (Map.Entry)iter.next();
             final String path = prefix + entry.getKey();
-            LayoutEventDescription led = new LayoutEventDescription();
-            led.path = path;
-            led.layoutId = id;
-            led.data = entry.getValue();
-            state.add(led);
+            if(!isCopletEvent){
+            	LayoutEventDescription led = new LayoutEventDescription();
+            	led.path = path;
+            	led.layoutId = id;
+            	led.data = entry.getValue();
+            	state.add(led);
+            }else{
+            	CopletEventDescription ced = new CopletEventDescription();
+            	ced.path = path;
+            	ced.copletId = id;
+            	ced.data = entry.getValue();
+            	state.add(ced);
+            }
         }
     }
 
@@ -96,14 +106,14 @@
                     history.add(state);
                 }
 
-                this.addValues(layout.getId(), state, layout.getAspectDatas(), "aspectDatas/");
-                this.addValues(layout.getId(), state, layout.getParameters(), "parameters/");
+                this.addValues(layout.getId(), state, layout.getAspectDatas(), "aspectDatas/",
false);
+                this.addValues(layout.getId(), state, layout.getParameters(), "parameters/",
false);
 
                 // are we a coplet layout
                 if ( layout instanceof CopletLayout ) {
                     CopletInstanceData cid = ((CopletLayout)layout).getCopletInstanceData();
-                    this.addValues(cid.getId(), state, cid.getAspectDatas(), "aspectDatas/");
-                    this.addValues(cid.getId(), state, cid.getAttributes(), "attributes/");
+                    this.addValues(cid.getId(), state, cid.getAspectDatas(), "aspectDatas/",
true);
+                    this.addValues(cid.getId(), state, cid.getAttributes(), "attributes/",
true);
                 }
                 session.setAttribute("portal-history", history);
             }

Modified: cocoon/blocks/portal/trunk/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/status.xml?rev=326427&r1=326426&r2=326427&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/status.xml (original)
+++ cocoon/blocks/portal/trunk/status.xml Wed Oct 19 00:21:56 2005
@@ -66,18 +66,18 @@
  <changes>
   <release version="@version@" date="@date@">
     <action dev="CZ">
-      Portal block: Add coplet size to coplet instance data. The size can be minimized,
-                    normal or full-screen. This removed the need for a special full screen
-                    handling.
+      Add coplet size to coplet instance data. The size can be minimized,
+      normal or full-screen. This removed the need for a special full screen
+      handling.
     </action>
     <action dev="CZ" type="add">
-      Portal block: Remove aspect datas from coplet datas. Attributes are now used instead.
+      Remove aspect datas from coplet datas. Attributes are now used instead.
     </action>
     <action dev="CZ" type="add">
-      Portal block: Remove deprecated Publisher, Subscriber, Filter and Register.
+      Remove deprecated Publisher, Subscriber, Filter and Register.
     </action>
     <action dev="CZ" type="add">
-      Portal block: Remove deprecated PortletPortalManager.
+      Remove deprecated PortletPortalManager.
     </action>
   </release>
  </changes>

Modified: cocoon/trunk/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=326427&r1=326426&r2=326427&view=diff
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Wed Oct 19 00:21:56 2005
@@ -551,6 +551,12 @@
    </action>
   </release>
   <release version="2.1.8" date="TBD">
+    <action dev="CZ" type="fix" fixes-bug="33152" due-to="Philippe Gassmann" due-to-email="phil@anyware-tech.com">
+      Portal block: Add title to basket item in the portal sample.
+    </action>
+    <action dev="CZ" type="fix" fixes-bug="37115,29405" due-to="Philippe Gassmann" due-to-email="phil@anyware-tech.com">
+      Portal block: Fix history aspect when coplets are used.
+    </action>
     <action dev="VG" type="fix" fixes-bug="35905">
       Do not flush and close output stream, servlet container
       will take care of it.



Mime
View raw message