if (constants == null) { constants = type.getDeclaringClass().getEnumConstants(); }
            public HtmlComponent createComponent(Object targetObject, Class type) {                Enum enumerate = (Enum) targetObject;                                HtmlMenu menu = new HtmlMenu();                                String defaultOptionTitle = getDefaultTitle();                menu.createDefaultOption(defaultOptionTitle).setSelected(enumerate == null);                                Object[] constants = type.getEnumConstants();                for (Object object : constants) {                    Enum oneEnum = (Enum) object;                    String description = RenderUtils.getEnumString(oneEnum, getBundle());                                        HtmlMenuOption option = menu.createOption(description);                    option.setValue(oneEnum.toString());                                        if (enumerate != null && oneEnum.equals(enumerate)) {                        option.setSelected(true);                    }                }                                menu.setConverter(new EnumConverter());                menu.setTargetSlot((MetaSlotKey) getInputContext().getMetaObject().getKey());                                return menu;            }