Repository: wicket Updated Branches: refs/heads/wicket-6.x c4656d00f -> fdb060119
Update PropertyResolver javadoc to explain that there is no special handling for IModel mail-discussion: http://markmail.org/message/ow2sn7e3a272dgfs (cherry picked from commit 410441f9aee009f880c3777563bf9d39c772a532) Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fdb06011 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fdb06011 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fdb06011 Branch: refs/heads/wicket-6.x Commit: fdb060119d9ce4fd3b0c85f30be64a10e88c728b Parents: c4656d0 Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Mon Nov 10 11:47:40 2014 +0200 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Mon Nov 10 11:50:05 2014 +0200 ---------------------------------------------------------------------- .../apache/wicket/core/util/lang/PropertyResolver.java | 13 ++++++++++--- .../java/org/apache/wicket/model/PropertyModel.java | 6 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/fdb06011/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 9ebbcf0..05eab58 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,11 +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><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/fdb06011/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 01d3d18..126e482 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 @@ -137,4 +137,4 @@ public class PropertyModel<T> extends AbstractPropertyModel<T> { return new PropertyModel<Z>(parent, property); } -} \ No newline at end of file +}
