Issues with StringToEnumConverter

Hey,

so I’ve been having some issues with the newly added StringToEnumConverter(), it formats the text for my comboboxes and i need them to be formated under diffrent guide lines. The current solution i have is to write my own Enum converter that converts the text in the fasion i need. The issue is that even with the new converter created and added to my comboboxes it still uses the Vaadin StringToEnumConverter().

Below is one of the chunks of code where its added to the combobox

ComboBox process = new ComboBox(); process.setId("process_type"); process.setConverter((Converter)new EnumConverter()); process.setConvertedValue(ProcessPIDs.PROCESS); process.setPropertyDataSource( cssUi.getSolutionData().getProcessItem() .getItemProperty( ProcessPIDs.PROCESS ) ); And the part where the Enums are added

[code]
UserData userData = VaadinSession.getCurrent().getAttribute(UserData.class);
EnumSet<? extends Enum> enumSet;
if(userData.hasRole(Role.ESELECT_BETA_TESTER)) enumSet = EnumSet.of(ProcessItem.PROCESSES.MECHANICAL);
else enumSet = EnumSet.allOf( ProcessItem.PROCESSES.class );

for( Object r : enumSet )
process.addItem(r);
[/code]And lastly my coverter class

[code]
public class EnumConverter extends StringToEnumConverter {
@Override
public String convertToPresentation(Enum value,
Class<? extends String> targetType, Locale locale)
throws ConversionException {
if (value == null) {
return null;
}
return value.toString();
}

private <T extends Enum<T>> T stringToEnum(String value,
        Class<T> enumType) throws ConversionException {
    try {
        EnumSet<T> set = EnumSet.allOf(enumType);
        for (T e : set) {
            if (e.toString().equals(value)) {
                    return e;
            }
        }
    } catch (Exception e) {
        System.out.println("damn it");
    }
    return null;
}

@Override
public Enum convertToModel(String value, Class<? extends Enum> targetType,
Locale locale) throws ConversionException {
if(value == null)
return null;
return stringToEnum(value, targetType);
}
}
[/code]I’m unsure of what the issue is in this and not really sure in what direction i should look for a solution so and help would be appreciated.

Thanks.