public class CountryConverter implements Converter, Serializable { Map map; public CountryConverter(List list) { map = new HashMap(); for (Country c : list) { map.put(c.getIso(), c); } } public Object getAsObject(FacesContext context, UIComponent component, String value) { return map.get(value); } public String getAsString(FacesContext context, UIComponent component, Object value) { if (value instanceof Country) { return ((Country) value).getIso(); } else { return null; } } }