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 2016/08/11 19:53:17 UTC
wicket git commit: WICKET-6190 fixed indentation problem with lambda
examples and a problem with pdf generation.
Repository: wicket
Updated Branches:
refs/heads/master 76116aa46 -> bf1e70aec
WICKET-6190 fixed indentation problem with lambda examples and a problem
with pdf generation.
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/bf1e70ae
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/bf1e70ae
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/bf1e70ae
Branch: refs/heads/master
Commit: bf1e70aec1567b80af216e0d0dfea55ac2f9d112
Parents: 76116aa
Author: Andrea Del Bene <ad...@apache.org>
Authored: Thu Aug 11 21:24:39 2016 +0200
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Thu Aug 11 21:51:36 2016 +0200
----------------------------------------------------------------------
.../src/docs/guide/http2push/http2push_2.gdoc | 3 +-
.../docs/guide/modelsforms/modelsforms_2.gdoc | 44 ++++++++++----------
2 files changed, 24 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/bf1e70ae/wicket-user-guide/src/docs/guide/http2push/http2push_2.gdoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/docs/guide/http2push/http2push_2.gdoc b/wicket-user-guide/src/docs/guide/http2push/http2push_2.gdoc
index 2e1999e..ed6d8d4 100644
--- a/wicket-user-guide/src/docs/guide/http2push/http2push_2.gdoc
+++ b/wicket-user-guide/src/docs/guide/http2push/http2push_2.gdoc
@@ -22,7 +22,8 @@ public class Jetty9PushBuilder implements PushBuilder
{
Request request = RequestCycle.get().getRequest();
HttpServletRequest httpRequest = (HttpServletRequest) request.getContainerRequest();
- org.eclipse.jetty.server.PushBuilder pushBuilder = org.eclipse.jetty.server.Request.getBaseRequest(httpRequest).getPushBuilder();
+ org.eclipse.jetty.server.PushBuilder pushBuilder =
+ org.eclipse.jetty.server.Request.getBaseRequest(httpRequest).getPushBuilder();
for (String path : paths)
{
pushBuilder.path(path);
http://git-wip-us.apache.org/repos/asf/wicket/blob/bf1e70ae/wicket-user-guide/src/docs/guide/modelsforms/modelsforms_2.gdoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/docs/guide/modelsforms/modelsforms_2.gdoc b/wicket-user-guide/src/docs/guide/modelsforms/modelsforms_2.gdoc
index faa79c9..c41169a 100644
--- a/wicket-user-guide/src/docs/guide/modelsforms/modelsforms_2.gdoc
+++ b/wicket-user-guide/src/docs/guide/modelsforms/modelsforms_2.gdoc
@@ -26,39 +26,39 @@ Most of the default methods we find in @IModel@ are meant to leverage Lambda exp
* *filter(predicate)*: Returns a @IModel@ checking whether the predicate holds for the contained object, if it is not null. If the predicate doesn't evaluate to true, the contained object will be null. Example:
{divcontainer:li-nested-content}
{code:java}
- //the filtered model will have a null model object if person's name
- //is not "Jane"
- IModel<Person> janeModel = Model.of(person)
- .filter((p) -> p.getName().equals("Jane"));
+//the filtered model will have a null model object if person's name
+//is not "Jane"
+IModel<Person> janeModel = Model.of(person)
+ .filter((p) -> p.getName().equals("Jane"));
{code}
{divcontainer}
* *map(mapperFunction)*: Returns a @IModel@ applying the given mapper to the contained object, if it is not null. Example:
{divcontainer:li-nested-content}
{code:java}
- //the new read-only model will contain the person's first name
- IModel<String> personNameModel = Model.of(person).map(Person::getName);
+//the new read-only model will contain the person's first name
+IModel<String> personNameModel = Model.of(person).map(Person::getName);
{code}
{divcontainer}
* *flatMap(mapperFunction)*: Returns a @IModel@ applying the given @IModel@-bearing mapper to the contained object, if it is not null. Example:
- {divcontainer:li-nested-content}
- {code:java}
- //returns a read/write model for person's first name
- //NOTE: LambdaModel will be discussed later.
- IModel<String> personNameModel = Model.of(person).flatMap(targetPerson ->
- LambdaModel.of(
- () -> targetPerson::getName, targetPerson::setName
- ));
- {code}
- {divcontainer}
+ {divcontainer:li-nested-content}
+ {code:java}
+//returns a read/write model for person's first name
+//NOTE: LambdaModel will be discussed later.
+IModel<String> personNameModel = Model.of(person).flatMap(targetPerson ->
+LambdaModel.of(
+ () -> targetPerson::getName, targetPerson::setName
+));
+ {code}
+ {divcontainer}
* *flatMap(otherModel, combiner)*: Returns a @IModel@ applying the given combining function to the current model object and to the one from the other model, if they are not null. Example:
{divcontainer:li-nested-content}
{code:java}
- Model<String> hello = Model.of("hello");
- Model<String> world = Model.of("world");
- IModel<String> combinedModel = hello.combineWith(
- world, (thisObj, otherObj) -> thisObj + " " + otherObj);
-
- assertEquals("hello world", combinedModel.getObject());
+IModel<String> hello = Model.of("hello");
+IModel<String> world = Model.of("world");
+IModel<String> combinedModel = hello.combineWith(
+ world, (thisObj, otherObj) -> thisObj + " " + otherObj);
+
+assertEquals("hello world", combinedModel.getObject());
{code}
{divcontainer}