PDA

View Full Version : [FIXED] Beta5: Bug in ModelData#getNestedValue()



tomsontom
16 Jun 2008, 9:38 AM
Hi,

It looks like you are using a none existant function List#subList() inside the getNestedValue()-method. To make it work I had to overload it myself with a code like this:

protected <X> X getNestedValue(ModelData model, List<String> paths) {
if (paths.size() == 1) {
return (X) model.get(paths.get(0));
} else {
Object obj = model.get(paths.get(0));
if (obj != null && obj instanceof ModelData) {
ArrayList<String> tmp = new ArrayList<String>(paths);
tmp.remove(0);
return (X) getNestedValue((ModelData) obj, tmp);
}
}
return null;
}

darrellmeyer
16 Jun 2008, 1:19 PM
Fix is in SVN.