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/27 12:38:28 UTC

wicket git commit: WICKET-6395 removed reference to no longer existing factory method Link#onClick

Repository: wicket
Updated Branches:
  refs/heads/master 573fdf573 -> 6ffc5be85


WICKET-6395 removed reference to no longer existing factory method
Link#onClick


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

Branch: refs/heads/master
Commit: 6ffc5be85309ef150c99a56a87d94e6e6448277b
Parents: 573fdf5
Author: Andrea Del Bene <ad...@apache.org>
Authored: Tue Jun 27 14:37:16 2017 +0200
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Tue Jun 27 14:39:43 2017 +0200

----------------------------------------------------------------------
 .../src/main/asciidoc/helloWorld/helloWorld_4.adoc | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/6ffc5be8/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 dae19ec..1f440fe 100644
--- a/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_4.adoc
+++ b/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_4.adoc
@@ -50,20 +50,17 @@ public void onClick() {
 The difference between using the first version of _setResponsePage_ rather than the second one will be illustrated in 
 <<_page_versioning_and_caching,chapter 8>>, when we will introduce the topic of stateful and stateless pages. For now, we can consider them as equivalent. 
 
-Like many other Wicket components, _Link_ is lambda-friendly and comes with a factory method called _onClick_ which leverages lambda expressions to specify handler method:
+Since Wicket 8 is built on Java 8, we can choose to leverage lambda expressions to specify handler method:
 
 [source,java]
 ----
-public class HomePage extends WebPage {
-    public HomePage(){
-        add(Link.onClick("id", () -> setResponsePage(AnotherPage.class));
-    }
-}
+//create a standard link component
+add(ComponentFactory.link("id", (newlink) -> {/*do stuff*/});
 ----
 
-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>>.
+Factory class _ComponentFactory_ is provided by the WicketStuff project. You can find more information on this project, as well as the instructions to use its modules, in Appendix B.
+
+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>>.
 
-NOTE: We can specify the content of a link (i.e. the text of the picture inside it) with its method _setBody_. This method takes in input a generic Wicket model, which will be the topic of 
-<<_wicket_models_and_forms,chapter 11>>.
+NOTE: We can specify the content of a link (i.e. the text inside it) with its method _setBody_. This method takes in input a generic Wicket model, which will be the topic of <<_wicket_models_and_forms,chapter 11>>.