Hi all,
I have a little bit stupid question. I got this message: End of weekend: 'Tuesday' must be convertible to an enum from the enum that contains the constant 'Tuesday'. Do I have to write my own converter or what should I do.

public enum DayOfWeek {

   MONDAY("Monday"),
   TUESDAY("Tuesday"),
   WEDNESDAY("Wednesday"),
   THURSDAY("Thursday"),
   FRIDAY("Friday"),
   SATURDAY("Saturday"),
   SUNDAY("Sunday");
   private String name;
}

***BEAN***
for (DayOfWeek day :DayOfWeek.values()){
      days.add(new SelectItem(day, day.getName()));
      }
***XHTML***
<tr:selectOneChoice required="true" label="End of weekend" value="#{addWeekendDiscount.weekend.endWeekend}">
<f:selectItems value="#{addWeekendDiscount.days}"/>
</tr:selectOneChoice>


Thanks Jozef.

Reply via email to