OK, but it seems, that EnumConverter is very poor. Maybe the format method
should be implemented as follows to take the advantage of
LocalizationUtility...?
    @SuppressWarnings("unchecked")
    public String format(Enum<?> enumField) {

        if (enumField == null) {
               return "";
        }

        Locale locale = getLocale();

        Class<Enum<?>> clazz = (Class<Enum<?>>) enumField.getClass();

        String result = null;
        String packageName = clazz.getPackage() == null ? "" : clazz
                .getPackage().getName();

        result = LocalizationUtility.getLocalizedFieldName(clazz
                .getSimpleName()
                + "." + enumField.name(), packageName, null, locale);

        if (result == null) {
                result = enumField.toString();
        }

        return result;
    }
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to