Hello,

If I fill a <f:selectItems> tag directly with getResultList(), I have this 
exception :

  | Argument Error: An option for component roadMapTypes was not an instance of 
javax.faces.model.SelectItem. Type found: java.util.ArrayList.
  | 

But when I put the results list in a new list with SelectItem objects before 
returning the results list, I have no exception... :

  | public Collection getRoadMapTypeList()
  |     {
  |         List returnValues = new ArrayList();
  |         String sql = "SELECT glos.value" +
  |                 " FROM Glos glos" +
  |                 " WHERE glos.glos_resume != '00000'" +
  |                 "   AND glos.glos_type = #{glos_roadmapsal_type}";
  |         List rmtList = 
super.getEntityManager().createQuery(sql).getResultList();
  |         for (Iterator itList = rmtList.iterator(); itList.hasNext();)
  |         {
  |             String value = (String) itList.next();
  |             returnValues.add(new SelectItem(value));
  |         }
  |         return returnValues;
  |     }
  | 

Is it a bug in Seam or in JSF ???

Thanks,

Olv

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102528#4102528

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102528
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to