From 8719ca4babd57ca16e584aa30b61f6157ad6dc70 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Wed, 10 Oct 2007 10:30:19 +0000 Subject: [PATCH] Eclipse/svn merge WTF commit. svn changeset:2480/svn branch:trunk --- src/com/itmill/toolkit/ui/CalendarField.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/com/itmill/toolkit/ui/CalendarField.java b/src/com/itmill/toolkit/ui/CalendarField.java index 34800f49c4..67e82ea0ee 100644 --- a/src/com/itmill/toolkit/ui/CalendarField.java +++ b/src/com/itmill/toolkit/ui/CalendarField.java @@ -20,6 +20,7 @@ public class CalendarField extends DateField implements Container.Viewer { private Date maxDate; private Container dataSource; + private Object itemStyleNamePropertyId; private Object itemStartPropertyId; private Object itemEndPropertyId; private Object itemTitlePropertyId; @@ -152,6 +153,14 @@ public class CalendarField extends DateField implements Container.Viewer { return false; } + public Object getItemStyleNamePropertyId() { + return itemStyleNamePropertyId; + } + + public void setItemStyleNamePropertyId(Object propertyId) { + this.itemStyleNamePropertyId = propertyId; + } + public Object getItemStartPropertyId() { return itemStartPropertyId; } @@ -261,8 +270,11 @@ public class CalendarField extends DateField implements Container.Viewer { if (start != null) { if ((start.getMonth() <= month || end.getMonth() >= month)) { target.startTag("item"); - // TODO different id! + // TODO different id? target.addAttribute("id", itemId.hashCode()); + p = item.getItemProperty(this.itemStyleNamePropertyId); + String styleName = (String) p.getValue(); + target.addAttribute("styleName", styleName); target.addAttribute("start", "" + start.getTime()); if (end != start) { target.addAttribute("end", "" + end.getTime()); -- 2.39.5