camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Copernico <engcopern...@gmail.com>
Subject Re: Camel Velocity pass ArrayList
Date Fri, 28 Aug 2015 11:33:19 GMT
private List<Item> itemList(){
  Query query = em.createNamedQuery("Items.findByDescription", Items.class);
  query.setParameter("description", "something");

  if(query.getResultList() != null && !query.getResultList().isEmpty()){
      return query.getResultList();
  }

  return new ArrayList();
}


The function is working well: when i debugging the fuction it returns a list
of item (is not empty). The problem is with adding the list to the header
and using it in a foreach loop in velocity template.

So the custion is how to use this array list in a foreach loop in velocity?

Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Velocity-pass-ArrayList-tp5771027p5771052.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message