Author: gvanmatre
Date: Fri Oct 14 21:18:22 2005
New Revision: 321287

URL: http://svn.apache.org/viewcvs?rev=321287&view=rev
Log:
The managedBeanName property of a nested Clay component was being ignored.

Modified:
    
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/AssignChildrenCommand.java

Modified: 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/AssignChildrenCommand.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/AssignChildrenCommand.java?rev=321287&r1=321286&r2=321287&view=diff
==============================================================================
--- 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/AssignChildrenCommand.java
 (original)
+++ 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/AssignChildrenCommand.java
 Fri Oct 14 21:18:22 2005
@@ -27,6 +27,7 @@
 import org.apache.commons.chain.Context;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.shale.clay.component.Clay;
 import org.apache.shale.clay.config.Globals;
 import org.apache.shale.clay.config.beans.ComponentBean;
 
@@ -72,6 +73,12 @@
                     .getMessage("clay.null.componentBean"));
         
         Iterator vi = displayElement.getChildrenIterator();
+        String managedBeanName = clayContext.getManagedBeanName();
+        if (parent instanceof Clay) {
+            if (((Clay) parent).getManagedBeanName() != null)
+               managedBeanName = ((Clay) parent).getManagedBeanName();   
+        }
+        
         int childIndex = 0;
         while (vi.hasNext()) {
             ComponentBean childDisplayElement = (ComponentBean) vi.next();
@@ -81,6 +88,7 @@
             subContext.setParent(parent);
             subContext.setChild(null);
             subContext.setChildIndex(childIndex);
+            subContext.setManagedBeanName(managedBeanName);
             
             Catalog catalog = getCatalog();
             Command command = catalog



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to