Use code tags, is more readable for us
About this
Code:
findAttsQuery.addFilter("Application", FilterOperator.EQUAL, id);
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
List<Entity> results = datastore.prepare(findAttsQuery).asList(FetchOptio ns.Builder.withDefaults());
int i =0;
ArrayList<Variable> vars = new ArrayList<Variable>(results.size());
ModelAndView mav = new ModelAndView();
while(i<results.size()) {
vars.add(new Variable(results.get(i).getKey().getName(),results .get(i).getProperty("Type").toString(),results.get (i).getProperty("Value").toString()));
mav.addObject("variable", vars);
How was filled the bold part? and how many elements are in your collection?
Code:
mav.addObject("variable", vars);
should be outside the loop. I moved it out but still the error.
OK