You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2015/12/27 18:22:19 UTC

[1/2] wicket git commit: WICKET-6059 TransparentWebMarkupContainer can not resolve autocomponents in its parent

Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x b5ee0cbf5 -> 25a6d4223


WICKET-6059 TransparentWebMarkupContainer can not resolve autocomponents in its parent


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d944d7b7
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d944d7b7
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d944d7b7

Branch: refs/heads/wicket-7.x
Commit: d944d7b7d26105b483e2ef910484775c03e5a5d5
Parents: b5ee0cb
Author: Andrea Del Bene <ad...@apache.org>
Authored: Sun Dec 27 17:45:54 2015 +0100
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Sun Dec 27 18:13:00 2015 +0100

----------------------------------------------------------------------
 .../html/TransparentWebMarkupContainer.java     |  3 +--
 .../html/border/BorderWithAutoLabelPage.html    | 14 +++++++++++++
 .../html/border/BorderWithAutoLabelPage.java    | 22 ++++++++++++++++++++
 .../markup/html/border/ComponentBorderTest.java |  6 ++++++
 4 files changed, 43 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/d944d7b7/wicket-core/src/main/java/org/apache/wicket/markup/html/TransparentWebMarkupContainer.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/TransparentWebMarkupContainer.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/TransparentWebMarkupContainer.java
index cc336f3..c5f87a9 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/TransparentWebMarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/TransparentWebMarkupContainer.java
@@ -56,8 +56,7 @@ public class TransparentWebMarkupContainer extends WebMarkupContainer implements
 	public Component resolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)
 	{
 		Component resolvedComponent = getParent().get(tag.getId());
-		if (resolvedComponent != null && 
-			(getPage().wasRendered(resolvedComponent) || resolvedComponent.isAuto()))
+		if (resolvedComponent != null && getPage().wasRendered(resolvedComponent))
 		{
 			/*
 			 * Means that parent container has an associated homonymous tag to this grandchildren

http://git-wip-us.apache.org/repos/asf/wicket/blob/d944d7b7/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html
new file mode 100644
index 0000000..cd5db63
--- /dev/null
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+    <div wicket:id="container">
+	    <div wicket:id="border">
+	        <label wicket:for="text" class="inline"><input type="text" wicket:id="text"/></label>
+	    </div>
+    </div>
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/d944d7b7/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java
new file mode 100644
index 0000000..9576fbf
--- /dev/null
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java
@@ -0,0 +1,22 @@
+package org.apache.wicket.markup.html.border;
+
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.TextField;
+
+public class BorderWithAutoLabelPage extends WebPage
+{
+	@Override
+	protected void onInitialize()
+	{
+		super.onInitialize();
+		BorderComponent1 component1 = new BorderComponent1("border");
+		WebMarkupContainer container = new WebMarkupContainer("container");
+		
+		component1.add(new TextField<>("text"));
+		container.add(component1);
+		
+		add(container);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/d944d7b7/wicket-core/src/test/java/org/apache/wicket/markup/html/border/ComponentBorderTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/ComponentBorderTest.java b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/ComponentBorderTest.java
index fb70117..8fed060 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/ComponentBorderTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/ComponentBorderTest.java
@@ -118,4 +118,10 @@ public class ComponentBorderTest extends WicketTestCase
 	{
 		tester.startPage(BorderWithEnclosurePage.class);
 	}
+	
+	@Test
+	public void borderWithAutoLabel() throws Exception
+	{
+		tester.startPage(BorderWithAutoLabelPage.class);
+	}
 }


[2/2] wicket git commit: Added missing license header

Posted by ad...@apache.org.
Added missing license header


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/25a6d422
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/25a6d422
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/25a6d422

Branch: refs/heads/wicket-7.x
Commit: 25a6d42235c0884d07e1ca985d5b6bedf8e5053e
Parents: d944d7b
Author: Andrea Del Bene <ad...@apache.org>
Authored: Sun Dec 27 17:52:19 2015 +0100
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Sun Dec 27 18:13:13 2015 +0100

----------------------------------------------------------------------
 .../markup/html/border/BorderWithAutoLabelPage.html | 14 ++++++++++++++
 .../markup/html/border/BorderWithAutoLabelPage.java | 16 ++++++++++++++++
 2 files changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/25a6d422/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html
index cd5db63..8b8a605 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.html
@@ -1,3 +1,17 @@
+<!--
+    ====================================================================
+    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.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
 <!DOCTYPE html>
 <html>
 <head>

http://git-wip-us.apache.org/repos/asf/wicket/blob/25a6d422/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java
index 9576fbf..27497da 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BorderWithAutoLabelPage.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.wicket.markup.html.border;
 
 import org.apache.wicket.markup.html.WebMarkupContainer;