cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: rev 37337 - cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl
Date Wed, 01 Sep 2004 12:31:31 GMT
Author: cziegeler
Date: Wed Sep  1 05:31:30 2004
New Revision: 37337

Modified:
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java
Log:
Fix bugs

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
Wed Sep  1 05:31:30 2004
@@ -115,6 +115,9 @@
     protected void prepareObject(Object object, PortalService service)
     throws ProcessingException {
         if ( object != null ) {
+            if ( object instanceof Map ) {
+                object = ((Map)object).values();
+            }
             if (object instanceof Layout) {
                 service.getComponentManager().getLayoutFactory().prepareLayout((Layout)object);
             } else if (object instanceof Collection) {
@@ -343,7 +346,7 @@
             final Map configs = new HashMap();
             if ( children != null ) {
                 for(int i=0; i < children.length; i++) {
-                    configs.put(children[i].getName(), children[i].getValue());
+                    configs.put(children[i].getName(), children[i].getAttribute("uri"));
                 }
             }
             info.setConfigurations(configs);
@@ -411,7 +414,7 @@
                     parameters.put(ProfileLS.PARAMETER_PROFILETYPE, 
                                    ProfileLS.PROFILETYPE_COPLETBASEDATA);        
 
-                    this.copletBaseDatas = ((CopletBaseDataManager)(Map)loader.loadProfile(key,
parameters)).getCopletBaseData();
+                    this.copletBaseDatas = ((CopletBaseDataManager)loader.loadProfile(key,
parameters)).getCopletBaseData();
                     this.prepareObject(this.copletBaseDatas, service);
                 }
             }
@@ -436,7 +439,7 @@
                     parameters.put(ProfileLS.PARAMETER_OBJECTMAP, 
                                    this.copletBaseDatas);
                     
-                    this.copletDatas = ((CopletDataManager)(Map)loader.loadProfile(key, parameters)).getCopletData();
                   
+                    this.copletDatas = ((CopletDataManager)loader.loadProfile(key, parameters)).getCopletData();
                   
                     this.prepareObject(this.copletDatas, service);
                 }
             }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java
Wed Sep  1 05:31:30 2004
@@ -85,6 +85,7 @@
         boolean first = true;
         while ( iter.hasNext() ) {
             final Map.Entry entry = (Entry) iter.next();
+            final String append = entry.getValue().toString();
             if ( pars ) {
                 if ( first ) {
                     first = false;
@@ -99,12 +100,11 @@
                 buffer.append(entry.getKey().toString());
                 buffer.append('=');
             } else {
-                if ( !first) {
+                if ( !first && !"?".equals(append) ) {
                     buffer.append('/');
                 }
                 first = false;
             }
-            String append = entry.getValue().toString();
             if ( "?".equals(append) ) {
                 first = true;
                 pars = true;

Mime
View raw message