public String getAsString(FacesContext context, UIComponent component, Object value) {
if (value == null) return null;
if (!(value instanceof Event)) {
throw new ConverterException("Error converting Event, got a " + value.getClass().getName());
}
Event obj = (Event) value;
return Long.toString(obj.getIdEvent());
}