camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Copernico <>
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?


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message