You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2014/11/10 10:49:24 UTC

wicket git commit: Update PropertyResolver javadoc to explain that there is no special handling for IModel

Repository: wicket
Updated Branches:
  refs/heads/master 6c964300f -> 410441f9a


Update PropertyResolver javadoc to explain that there is no special handling for IModel

mail-discussion: http://markmail.org/message/ow2sn7e3a272dgfs


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

Branch: refs/heads/master
Commit: 410441f9aee009f880c3777563bf9d39c772a532
Parents: 6c96430
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Nov 10 11:47:40 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Nov 10 11:47:40 2014 +0200

----------------------------------------------------------------------
 .../apache/wicket/core/util/lang/PropertyResolver.java | 13 ++++++++-----
 .../java/org/apache/wicket/model/PropertyModel.java    |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/410441f9/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
index 5b668c4..37d5edb 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
@@ -40,12 +40,12 @@ import org.slf4j.LoggerFactory;
  * This class parses expressions to lookup or set a value on the object that is given. <br/>
  * The supported expressions are:
  * <p>
- * "property": This can can then be a bean property with get and set method. Or if a map is given as
+ * "property": This could be a bean property with get and set method. Or if a map is given as
  * an object it will be lookup with the property as a key when there is not get method for that
  * property.
  * <p/>
  * <p>
- * "property1.property2": Both properties are lookup as written above. If property1 evaluates to
+ * "property1.property2": Both properties are looked up as described above. If property1 evaluates to
  * null then if there is a setMethod (or if it is a map) and the Class of the property has a default
  * constructor then the object will be constructed and set on the object.
  * <p/>
@@ -53,15 +53,18 @@ import org.slf4j.LoggerFactory;
  * "property.index": If the property is a List or Array then the second property can be a index on
  * that list like: 'mylist.0' this expression will also map on a getProperty(index) or
  * setProperty(index,value) methods. If the object is a List then the list will grow automatically
- * if the index is greater then the size
+ * if the index is greater than the size
  * <p/>
  * <p>
  * Index or map properties can also be written as: "property[index]" or "property[key]"
- *
+ * <p/>
+ * <p>
  * <strong>Note that the property resolver by default provides access to private members and methods. If
  * guaranteeing encapsulation of the target objects is a big concern, you should consider using an
  * alternative implementation.</strong>
- * <p/>
+ * </p>
+ * <p><strong>Note: If a property evaluates to an instance of {@link org.apache.wicket.model.IModel} then
+ * the expression should use '.object' to work with its value.</strong></p>
  *
  * @author jcompagner
  */

http://git-wip-us.apache.org/repos/asf/wicket/blob/410441f9/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java b/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java
index 37a42b6..c869929 100644
--- a/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java
@@ -64,9 +64,9 @@ import org.apache.wicket.core.util.lang.PropertyResolver;
  * 
  * </p>
  * <p>
- * Note that the property resolver by default provides access to private members and methods. If
+ * <strong>Note that the property resolver by default provides access to private members and methods. If
  * guaranteeing encapsulation of the target objects is a big concern, you should consider using an
- * alternative implementation.
+ * alternative implementation.</strong>
  * </p>
  * 
  * @see PropertyResolver