Author: jcompagner
Date: Sun Oct  5 12:54:57 2008
New Revision: 701876

URL: http://svn.apache.org/viewvc?rev=701876&view=rev
Log:
more informative error message WICKET-1802

Modified:
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java?rev=701876&r1=701875&r2=701876&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java
 Sun Oct  5 12:54:57 2008
@@ -36,23 +36,27 @@
  * NOTE: THIS CLASS IS NOT PART OF THE WICKET PUBLIC API, DO NOT USE IT UNLESS 
YOU KNOW WHAT YOU ARE
  * DOING.
  * <p>
- * This class parses expressions to lookup or set a value on the object that 
is given. <br/> The
- * supported expressions are:
+ * 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
  * an object it will be lookup with the property as a key when there is not 
get method for that
- * property. <p/>
+ * property.
+ * <p/>
  * <p>
  * "property1.property2": Both properties are lookup as written 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/>
+ * constructor then the object will be constructed and set on the object.
+ * <p/>
  * <p>
  * "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 <p/>
+ * if the index is greater then the size
+ * <p/>
  * <p>
- * Index or map properties can also be written as: "property[index]" or 
"property[key]" <p/>
+ * Index or map properties can also be written as: "property[index]" or 
"property[key]"
+ * <p/>
  * 
  * @author jcompagner
  */
@@ -721,7 +725,7 @@
                }
 
                /**
-                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, 
Object,
+                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object,
                 *      PropertyResolverConverter)
                 */
                @SuppressWarnings("unchecked")
@@ -759,7 +763,7 @@
                }
 
                /**
-                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, 
Object,
+                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object,
                 *      PropertyResolverConverter)
                 */
                @SuppressWarnings("unchecked")
@@ -816,7 +820,7 @@
                }
 
                /**
-                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, 
Object,
+                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object,
                 *      PropertyResolverConverter)
                 */
                public void setValue(Object object, Object value, 
PropertyResolverConverter converter)
@@ -869,7 +873,7 @@
                }
 
                /**
-                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, 
Object,
+                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object,
                 *      PropertyResolverConverter)
                 */
                public void setValue(Object object, Object value, 
PropertyResolverConverter converter)
@@ -946,7 +950,7 @@
                }
 
                /**
-                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, 
Object,
+                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object,
                 *      PropertyResolverConverter)
                 */
                public void setValue(Object object, Object value, 
PropertyResolverConverter converter)
@@ -1106,7 +1110,8 @@
                        else
                        {
                                throw new WicketRuntimeException("no set method 
defined for value: " + value +
-                                       " on object: " + object);
+                                       " on object: " + object + " while 
respective getMethod being " +
+                                       getMethod.getName());
                        }
                }
 
@@ -1274,7 +1279,7 @@
                }
 
                /**
-                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, 
Object,
+                * @see 
org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object,
                 *      PropertyResolverConverter)
                 */
                public void setValue(Object object, Object value, 
PropertyResolverConverter converter)


Reply via email to