Author: amarkhel
Date: 2010-12-22 11:02:27 -0500 (Wed, 22 Dec 2010)
New Revision: 20747
Modified:
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarDataModelImpl.java
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarDataModelItemImpl.java
trunk/ui/input/ui/src/main/java/org/richfaces/model/CalendarDataModel.java
trunk/ui/input/ui/src/main/java/org/richfaces/model/CalendarDataModelItem.java
trunk/ui/input/ui/src/test/java/org/richfaces/component/CalendarDataModelImpl.java
trunk/ui/input/ui/src/test/java/org/richfaces/component/CalendarDataModelItemImpl.java
Log:
RF-9916 calendar datamodel: add all the methods from 3.3.x back
Modified:
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarDataModelImpl.java
===================================================================
---
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarDataModelImpl.java 2010-12-22
15:41:42 UTC (rev 20746)
+++
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarDataModelImpl.java 2010-12-22
16:02:27 UTC (rev 20747)
@@ -67,4 +67,8 @@
return item;
}
+
+ public Object getToolTip(Date date) {
+ return null;
+ }
}
Modified:
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarDataModelItemImpl.java
===================================================================
---
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarDataModelItemImpl.java 2010-12-22
15:41:42 UTC (rev 20746)
+++
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarDataModelItemImpl.java 2010-12-22
16:02:27 UTC (rev 20747)
@@ -54,5 +54,21 @@
public void setStyleClass(String styleClass) {
this.styleClass = styleClass;
+ }
+
+ public Object getData() {
+ return null;
+ }
+
+ public boolean hasToolTip() {
+ return false;
+ }
+
+ public Object getToolTip() {
+ return null;
+ }
+
+ public int getDay() {
+ return 0;
}
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/model/CalendarDataModel.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/model/CalendarDataModel.java 2010-12-22
15:41:42 UTC (rev 20746)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/model/CalendarDataModel.java 2010-12-22
16:02:27 UTC (rev 20747)
@@ -36,5 +36,10 @@
* This method will be called in Ajax mode when Calendar renders new page.
* */
CalendarDataModelItem[] getData(Date[] dateArray);
-
+
+ /**
+ * @return tool tip when it's used in "single" mode
+ * This method used when tool tips are displayed in "single" mode
+ * */
+ public Object getToolTip(Date date);
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/model/CalendarDataModelItem.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/model/CalendarDataModelItem.java 2010-12-22
15:41:42 UTC (rev 20746)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/model/CalendarDataModelItem.java 2010-12-22
16:02:27 UTC (rev 20747)
@@ -40,7 +40,27 @@
* For example it may be �relevant holyday� � that mean class will be like
�rich-cal-day relevant holyday�.
* Default implementation return empty string.
* */
- public String getStyleClass();
+ public String getStyleClass();
+
+ /**
+ * @return any additional payload that must be JSON-serialazable object.
+ * May be used in custom date representation on calendar (inside custom facet).*/
+ public Object getData();
+
+ /**
+ * @return true if given date has an associated with it tooltip data.
+ * Default implementation return false.*/
+ public boolean hasToolTip();
+
+ /**
+ *@return tool tip data that will be used in �batch� tooltip loading mode.
+ **/
+ public Object getToolTip();
+
+ /**
+ *@return day of the month on which data must be shown.
+ **/
+ public int getDay();
}
Modified:
trunk/ui/input/ui/src/test/java/org/richfaces/component/CalendarDataModelImpl.java
===================================================================
---
trunk/ui/input/ui/src/test/java/org/richfaces/component/CalendarDataModelImpl.java 2010-12-22
15:41:42 UTC (rev 20746)
+++
trunk/ui/input/ui/src/test/java/org/richfaces/component/CalendarDataModelImpl.java 2010-12-22
16:02:27 UTC (rev 20747)
@@ -61,4 +61,8 @@
return item;
}
+
+ public Object getToolTip(Date date) {
+ return null;
+ }
}
Modified:
trunk/ui/input/ui/src/test/java/org/richfaces/component/CalendarDataModelItemImpl.java
===================================================================
---
trunk/ui/input/ui/src/test/java/org/richfaces/component/CalendarDataModelItemImpl.java 2010-12-22
15:41:42 UTC (rev 20746)
+++
trunk/ui/input/ui/src/test/java/org/richfaces/component/CalendarDataModelItemImpl.java 2010-12-22
16:02:27 UTC (rev 20747)
@@ -54,5 +54,21 @@
public void setStyleClass(String styleClass) {
this.styleClass = styleClass;
+ }
+
+ public Object getData() {
+ return null;
+ }
+
+ public boolean hasToolTip() {
+ return false;
+ }
+
+ public Object getToolTip() {
+ return null;
+ }
+
+ public int getDay() {
+ return 0;
}
}
Show replies by date