You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2005/09/16 09:40:07 UTC

svn commit: r289415 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input: CopletModule.java LayoutModule.java

Author: cziegeler
Date: Fri Sep 16 00:40:04 2005
New Revision: 289415

URL: http://svn.apache.org/viewcvs?rev=289415&view=rev
Log:
Fix CopletModule.

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java?rev=289415&r1=289414&r2=289415&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java Fri Sep 16 00:40:04 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-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.
@@ -88,16 +88,9 @@
                 return copletId;
             }
             JXPathContext jxpathContext = JXPathContext.newContext(portalService.getComponentManager().getProfileManager().getCopletInstanceData(copletId));
-            Object value = jxpathContext.getValue(name);
-                
-            if (value == null) {
-                return null;
-            }
-                
-            return value.toString();
-            
+            return jxpathContext.getValue(name);            
         } catch (ServiceException e) {
-            throw new ConfigurationException("ServiceException ", e);
+            throw new ConfigurationException("Unable to lookup portal service.", e);
         } finally {
             this.manager.release(portalService);
         }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java?rev=289415&r1=289414&r2=289415&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java Fri Sep 16 00:40:04 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-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.
@@ -68,13 +68,11 @@
                 final JXPathContext jxpathContext = JXPathContext.newContext(layout);
                 value = jxpathContext.getValue(path);
             }
-            return value;
-            
+            return value;            
         } catch (ServiceException e) {
-            throw new ConfigurationException("ServiceException ", e);
+            throw new ConfigurationException("Unable to lookup portal service.", e);
         } finally {
             this.manager.release(portalService);
         }
     }
-
 }