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 2017/06/23 15:57:01 UTC

wicket git commit: Started to remove reference to lambda-based fatory methods that have been removed from code.

Repository: wicket
Updated Branches:
  refs/heads/master 38bee6e93 -> 9e4c97cd6


Started to remove reference to lambda-based fatory methods that have
been removed from code.

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

Branch: refs/heads/master
Commit: 9e4c97cd6974484cb2fe6781ad85d6dfd6266e68
Parents: 38bee6e
Author: Andrea Del Bene <ad...@apache.org>
Authored: Fri Jun 23 17:56:00 2017 +0200
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Fri Jun 23 17:56:13 2017 +0200

----------------------------------------------------------------------
 .../main/asciidoc/helloWorld/helloWorld_4.adoc    |  2 --
 .../src/main/asciidoc/layout/layout_2.adoc        |  2 +-
 .../versioningCaching/versioningCaching_3.adoc    | 18 ++++++++----------
 .../main/asciidoc/wicketstuff/wicketstuff_7.adoc  |  3 +++
 4 files changed, 12 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4c97cd/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_4.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_4.adoc b/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_4.adoc
index 0c60adc..dae19ec 100644
--- a/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_4.adoc
+++ b/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_4.adoc
@@ -61,8 +61,6 @@ public class HomePage extends WebPage {
 }
 ----
 
-The lambda expression is converted into a _org.danekja.java.util.function.serializable.SerializableConsumer_, which is a serializable version of _java.util.function.Consumer<T>_ (we will see later why we need it to be serializable).
-
 Wicket comes with a rich set of link components suited for every need (links to static URL, Ajax-enhanced links, links to a file to download, links to external pages and so on). We will see them in 
 <<_wicket_links_and_url_generation,chapter 10>>.
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4c97cd/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc b/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc
index c28191a..fba873e 100644
--- a/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc
+++ b/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc
@@ -42,7 +42,7 @@ Label name = (Label)get("innerContainer:name");
 ----
 
 * replace a specific child component with a new component having the same id (with method _replace_).
-* iterate thought children components with the iterator returned by method _iterator_ or using visitor pattern1 with methods _visitChildren_.
+* iterate thought children components with the iterator returned by method _iterator_ or using visitor pattern with methods _visitChildren_.
 
 Both _Panel_ and _WebPage_ have their own associated markup file which is used to render the corresponding component. If such file is not provided, Wicket will apply markup inheritance looking for a markup file through their ancestor classes. When a panel is attached to a container, the content of its markup file is inserted into its related tag.
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4c97cd/wicket-user-guide/src/main/asciidoc/versioningCaching/versioningCaching_3.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/versioningCaching/versioningCaching_3.adoc b/wicket-user-guide/src/main/asciidoc/versioningCaching/versioningCaching_3.adoc
index 24643e7..8ebe4be 100644
--- a/wicket-user-guide/src/main/asciidoc/versioningCaching/versioningCaching_3.adoc
+++ b/wicket-user-guide/src/main/asciidoc/versioningCaching/versioningCaching_3.adoc
@@ -16,16 +16,14 @@ In order to comply with the second requirement it could be helpful to check if a
 ----
 @Override
 protected void onInitialize() {
-		super.onInitialize();
-		
-		visitChildren(new IVisitor<Component, Void>() {
-			@Override
-			public void component(Component component, IVisit<Void> arg1) {
-				if(!component.isStateless())
-		  			System.out.println("Component " + component.getId() + " is not stateless");
-			}
-		});
-	}
+	super.onInitialize();
+	
+	visitChildren((component, visit) -> {
+		if(!component.isStateless()) {
+	  	   System.out.println("Component " + component.getId() + " is not stateless");
+		}
+	});
+}
 ----
 
 Alternatively, we could use the _StatelessComponent_ utility annotation along with the _StatelessChecker_ class (they are both in package _org.apache.wicket.devutils.stateless_). _StatelessChecker_ will throw an _IllegalArgumentException_ if a component annotated with _StatelessComponent_ doesn't respect the requirements for being stateless. To use _StatelessComponent_ annotation we must first add the _StatelessChecker_ to our application as a component render listener:

http://git-wip-us.apache.org/repos/asf/wicket/blob/9e4c97cd/wicket-user-guide/src/main/asciidoc/wicketstuff/wicketstuff_7.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/wicketstuff/wicketstuff_7.adoc b/wicket-user-guide/src/main/asciidoc/wicketstuff/wicketstuff_7.adoc
index 32641cf..f2beb18 100644
--- a/wicket-user-guide/src/main/asciidoc/wicketstuff/wicketstuff_7.adoc
+++ b/wicket-user-guide/src/main/asciidoc/wicketstuff/wicketstuff_7.adoc
@@ -9,6 +9,9 @@ add(ComponentFactory.link("id", (link) -> {/*do stuff*/});
 add(ComponentFactory.ajaxLink("id", (ajaxLink, ajaxTarget) -> {/*do stuff*/});
 ----
 
+The factory uses library https://github.com/danekja/jdk-serializable-functional[jdk-serializable-functional] to convert lambda expressions into a serializable version of java.util.function.* interfaces.
+
+
 _AjaxButton_ and _AjaxSubmitLink_ are also supported:
 
 [source,java]