Author: ivaynberg
Date: Thu Nov  1 11:49:49 2007
New Revision: 591119

URL: http://svn.apache.org/viewvc?rev=591119&view=rev
Log:
enclsoure should also check child.isrenderallowed()

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java?rev=591119&r1=591118&r2=591119&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java
 Thu Nov  1 11:49:49 2007
@@ -121,21 +121,21 @@
                if (parent == null)
                {
                        throw new WicketRuntimeException(
-                                       "Unable to find parent component which 
is not a transparent resolver");
+                               "Unable to find parent component which is not a 
transparent resolver");
                }
 
                if (childId == null)
                {
                        throw new MarkupException(
-                                       "You most likely forgot to register the 
EnclosureHandler with the MarkupParserFactory");
+                               "You most likely forgot to register the 
EnclosureHandler with the MarkupParserFactory");
                }
 
                final Component child = parent.get(childId.toString());
                if (child == null)
                {
                        throw new MarkupException(
-                                       "Didn't find child component of 
<wicket:enclosure> with id='" + childId +
-                                                       "'. Component: " + 
this.toString());
+                               "Didn't find child component of 
<wicket:enclosure> with id='" + childId +
+                                       "'. Component: " + this.toString());
                }
 
                return child;
@@ -156,12 +156,12 @@
                if (childComponent == this)
                {
                        throw new WicketRuntimeException(
-                                       "Programming error: childComponent == 
enclose component; endless loop");
+                               "Programming error: childComponent == enclose 
component; endless loop");
                }
                else if (childComponent != null)
                {
                        // Delegate to child component
-                       setVisible(childComponent.isVisible());
+                       setVisible(childComponent.isVisible() && 
childComponent.isRenderAllowed());
                }
 
                if (isVisible() == true)


Reply via email to