You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by so...@apache.org on 2017/10/14 03:39:00 UTC

[1/4] wicket git commit: Small fix to text formatting

Repository: wicket
Updated Branches:
  refs/heads/WICKET-6105-java.time 559796c40 -> 39bbfb91c


Small fix to text formatting


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

Branch: refs/heads/WICKET-6105-java.time
Commit: 9eba234e8087edc368a2804a90c93fe4aeec4c5d
Parents: 58a7106
Author: Andrea Del Bene <ad...@apache.org>
Authored: Mon Oct 9 14:26:30 2017 +0200
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Mon Oct 9 14:26:30 2017 +0200

----------------------------------------------------------------------
 wicket-user-guide/src/main/asciidoc/resources/resources_8.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/9eba234e/wicket-user-guide/src/main/asciidoc/resources/resources_8.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/resources/resources_8.adoc b/wicket-user-guide/src/main/asciidoc/resources/resources_8.adoc
index 5df1703..16a9954 100644
--- a/wicket-user-guide/src/main/asciidoc/resources/resources_8.adoc
+++ b/wicket-user-guide/src/main/asciidoc/resources/resources_8.adoc
@@ -58,7 +58,7 @@ The following code is taken from the Application class of the project:
     }
 ----
 
-As you can see in the code above the _bucket_ that will contain JavaScript tags is called _ .[footer-container] To make a use of it the developer have to add a special component called _HeaderResponseContainer_ in his page:
+As you can see in the code above the _bucket_ that will contain JavaScript tags is called _footer-container_ To make a use of it the developer have to add a special component called _HeaderResponseContainer_ in his page:
 
 [source,java]
 ----


[4/4] wicket git commit: Merge remote-tracking branch 'origin/master' into WICKET-6105-java.time

Posted by so...@apache.org.
Merge remote-tracking branch 'origin/master' into WICKET-6105-java.time


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

Branch: refs/heads/WICKET-6105-java.time
Commit: 39bbfb91cd5d44c9dcf0e5cfda9d62a1e948acd6
Parents: 559796c 123c10a
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Sat Oct 14 10:38:46 2017 +0700
Committer: Maxim Solodovnik <so...@gmail.com>
Committed: Sat Oct 14 10:38:46 2017 +0700

----------------------------------------------------------------------
 .../wicket/validation/CompoundValidator.java    | 124 +++++++++++++++++++
 .../validation/CompoundValidatorTest.java       |  72 +++++++++++
 .../main/asciidoc/resources/resources_8.adoc    |   2 +-
 3 files changed, 197 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[2/4] wicket git commit: Jetty updated due to bug https://github.com/eclipse/jetty.project/issues/1797

Posted by so...@apache.org.
Jetty updated due to bug https://github.com/eclipse/jetty.project/issues/1797


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

Branch: refs/heads/WICKET-6105-java.time
Commit: cfcfc26d76fe399b20eaaadcb2780570a10e82ef
Parents: 9eba234
Author: Andrea Del Bene <ad...@apache.org>
Authored: Fri Oct 13 17:25:06 2017 +0200
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Fri Oct 13 17:25:06 2017 +0200

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/cfcfc26d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c2b4997..a5cf4db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -126,7 +126,7 @@
 		<!-- Project Versions -->
 		<cglib.version>3.2.5</cglib.version>
 		<jacoco.version>0.7.9</jacoco.version>
-		<jetty.version>9.4.6.v20170531</jetty.version>
+		<jetty.version>9.4.7.v20170914</jetty.version>
 		<joda-time.version>2.9.9</joda-time.version>
 		<junit.version>4.12</junit.version>
 		<spring.version>4.3.10.RELEASE</spring.version>


[3/4] wicket git commit: WICKET-6482 delegate to nested behaviors

Posted by so...@apache.org.
WICKET-6482 delegate to nested behaviors


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

Branch: refs/heads/WICKET-6105-java.time
Commit: 123c10a20f5152ff2b236ae5fe6dcbe6e9ba060f
Parents: cfcfc26
Author: Sven Meier <sv...@apache.org>
Authored: Fri Oct 13 21:57:58 2017 +0200
Committer: Sven Meier <sv...@apache.org>
Committed: Fri Oct 13 21:58:24 2017 +0200

----------------------------------------------------------------------
 .../wicket/validation/CompoundValidator.java    | 124 +++++++++++++++++++
 .../validation/CompoundValidatorTest.java       |  72 +++++++++++
 2 files changed, 196 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/123c10a2/wicket-core/src/main/java/org/apache/wicket/validation/CompoundValidator.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/validation/CompoundValidator.java b/wicket-core/src/main/java/org/apache/wicket/validation/CompoundValidator.java
index 3d9ef8f..77b2c60 100644
--- a/wicket-core/src/main/java/org/apache/wicket/validation/CompoundValidator.java
+++ b/wicket-core/src/main/java/org/apache/wicket/validation/CompoundValidator.java
@@ -21,7 +21,11 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.wicket.Component;
 import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.util.lang.Args;
 
 /**
@@ -83,4 +87,124 @@ public class CompoundValidator<T> extends Behavior implements IValidator<T>
 	{
 		return Collections.unmodifiableList(validators);
 	}
+
+	@Override
+	public void beforeRender(Component component)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).beforeRender(component);
+			}
+		}
+	}
+
+	@Override
+	public void afterRender(Component component)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).afterRender(component);
+			}
+		}
+	}
+
+	@Override
+	public void bind(Component component)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).bind(component);
+			}
+		}
+	}
+
+	@Override
+	public void unbind(Component component)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).unbind(component);
+			}
+		}
+	}
+	
+	@Override
+	public void detach(Component component)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).detach(component);
+			}
+		}
+	}
+
+	@Override
+	public void onException(Component component, RuntimeException exception)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).onException(component, exception);
+			}
+		}
+	}
+
+	public boolean getStatelessHint(Component component)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior && ((Behavior)validator).getStatelessHint(component) == false) {
+				return false;
+			}
+		}
+		return super.getStatelessHint(component);
+	}
+
+	@Override
+	public void onComponentTag(Component component, ComponentTag tag)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).onComponentTag(component, tag);
+			}
+		}
+	}
+
+	@Override
+	public void renderHead(Component component, IHeaderResponse response)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).renderHead(component, response);
+			}
+		}
+	}
+
+	@Override
+	public void onConfigure(Component component)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).onConfigure(component);
+			}
+		}
+	}
+
+	@Override
+	public void onEvent(Component component, IEvent<?> event)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).onEvent(component, event);
+			}
+		}
+	}
+
+	@Override
+	public void onRemove(Component component)
+	{
+		for (IValidator<T> validator : validators) {
+			if (validator instanceof Behavior) {
+				((Behavior)validator).onRemove(component);
+			}
+		}
+	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/123c10a2/wicket-core/src/test/java/org/apache/wicket/validation/CompoundValidatorTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/validation/CompoundValidatorTest.java b/wicket-core/src/test/java/org/apache/wicket/validation/CompoundValidatorTest.java
new file mode 100644
index 0000000..22091e5
--- /dev/null
+++ b/wicket-core/src/test/java/org/apache/wicket/validation/CompoundValidatorTest.java
@@ -0,0 +1,72 @@
+/*
+ * 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.validation;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.validation.validator.RangeValidator;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+/**
+ * Test for {@link CompoundValidator}.
+ */
+public class CompoundValidatorTest
+{
+	/**
+	 * WICKET-6482 delegate to nested behaviors
+	 */
+	@SuppressWarnings("unchecked")
+	@Test
+	public void delegate() {
+		CompoundValidator<String> compound = new CompoundValidator<>();
+		
+		compound.add(new IValidator<String>()
+		{
+			@Override
+			public void validate(IValidatable<String> validatable)
+			{
+			}
+		});
+		
+		RangeValidator<String> validator = Mockito.mock(RangeValidator.class);
+		compound.add(validator);
+
+		Component component = null;
+
+		compound.bind(component);
+		compound.onConfigure(component);
+		compound.renderHead(component, null);
+		compound.beforeRender(component);
+		compound.onComponentTag(component, null);
+		compound.afterRender(component);
+		compound.onEvent(component, null);
+		compound.onException(component, null);
+		compound.onRemove(component);
+		compound.detach(component);
+		
+		Mockito.verify(validator).bind(component);
+		Mockito.verify(validator).onConfigure(component);
+		Mockito.verify(validator).renderHead(component, null);
+		Mockito.verify(validator).beforeRender(component);
+		Mockito.verify(validator).onComponentTag(component, null);
+		Mockito.verify(validator).afterRender(component);
+		Mockito.verify(validator).onEvent(component, null);
+		Mockito.verify(validator).onException(component, null);
+		Mockito.verify(validator).onRemove(component);
+		Mockito.verify(validator).detach(component);
+	}
+}
\ No newline at end of file