-
Feb 1st, 2013, 02:24 AM
#1
Spring MVC 3 binding error List<Integer>
hi friends, I got an error on binding attribute defined like this:
List<Integer> values;
if changed it to List<String> ,or any other class I defined by myown,like List<classB>, it works fine.
what's the reason? is that because of Integer has no constrator with no parameter: Integer()?
thanks alot,
My dto class like this:
class Adto {
String id;
List<classB> vb;
}
class classB {
String id;
List<Integer> values;
}
i use freemarker,
<@spring.formInput "aForm.vb[0].values[0]"/>
i got error like this:
org.springframework.beans.NullValueInNestedPathExc eption: Invalid property 'vb[0].values' of bean class [com.woods.seller.dto.Adto]: Could not instantiate property type [java.lang.Integer] to auto-grow nested property path: java.lang.InstantiationException: java.lang.Integer
at org.springframework.beans.BeanWrapperImpl.newValue (BeanWrapperImpl.java:655)
at org.springframework.beans.BeanWrapperImpl.growColl ectionIfNecessary(BeanWrapperImpl.java:887)
if i changed values to List<String>, it works ok
-
Feb 22nd, 2013, 04:10 AM
#2
Hi,
I have the same problem. Don't know why it doesn't work with Integer, until then I'll switch to String.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules