Repository: wicket
Updated Branches:
  refs/heads/master 2b28c7fcc -> 0b0158b47


WICKET-6190 Completed the section about default methods for IModel.

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

Branch: refs/heads/master
Commit: 0b0158b475148d1b18f8c73b64dc07bf5463fb34
Parents: 2b28c7f
Author: Andrea Del Bene <[email protected]>
Authored: Sat Aug 13 21:03:37 2016 +0200
Committer: Andrea Del Bene <[email protected]>
Committed: Sat Aug 13 21:03:37 2016 +0200

----------------------------------------------------------------------
 .../src/docs/guide/modelsforms/modelsforms_2.gdoc           | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/0b0158b4/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 c41169a..9f1584c 100644
--- a/wicket-user-guide/src/docs/guide/modelsforms/modelsforms_2.gdoc
+++ b/wicket-user-guide/src/docs/guide/modelsforms/modelsforms_2.gdoc
@@ -61,5 +61,10 @@ IModel<String> combinedModel = hello.combineWith(
 assertEquals("hello world", combinedModel.getObject());
         {code}
     {divcontainer}
-       
- TODO:add other methods
+ * *orElseGet(supplier)*:  Returns a read-only @IModel@ using either the 
contained object or invoking the given supplier to get a default value. Example:
+    {divcontainer:li-nested-content}   
+        {code:java}
+IModel<String> nullObj = new Model();
+assertEquals("hello!", nullObj.orElseGet(() -> "hello!");
+        {code}
+    {divcontainer}       

Reply via email to