NewEnumPropertySelectionModel<CronSchedule.Type> typeModel = new NewEnumPropertySelectionModel<CronSchedule.Type>(CronSchedule.Type.class);
NewEnumPropertySelectionModel typeModel = new NewEnumPropertySelectionModel(); typeModel.setEnumType(CronSchedule.Type.class);
    protected void prepareForRender(IRequestCycle cycle) {        super.prepareForRender(cycle);        if (getTypeModel() == null) {            NewEnumPropertySelectionModel<CronSchedule.Type> typeModel =                 new NewEnumPropertySelectionModel<CronSchedule.Type>(CronSchedule.Type.class);            LocalizedOptionModelDecorator decoratedModel = new LocalizedOptionModelDecorator();            decoratedModel.setMessages(getMessages());            decoratedModel.setModel(typeModel);            decoratedModel.setResourcePrefix("type.");            setTypeModel(decoratedModel);        }        if (getDayOfWeekModel() == null) {            EnumPropertySelectionModel dayModel = new EnumPropertySelectionModel();            dayModel.setOptions(ScheduledDay.DAYS_OF_WEEK);            setDayOfWeekModel(dayModel);        }    }