Author: ayanul
Date: 2007-10-10 12:09:21 -0400 (Wed, 10 Oct 2007)
New Revision: 3315
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java
trunk/test-applications/jsp/src/main/java/calendar/CalendarValidator.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-10-10
16:08:39 UTC (rev 3314)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-10-10
16:09:21 UTC (rev 3315)
@@ -28,8 +28,8 @@
import java.util.Locale;
import java.util.StringTokenizer;
import java.util.TimeZone;
+
import javax.faces.event.ValueChangeEvent;
-import javax.faces.webapp.UIComponentTag;
import org.richfaces.event.CurrentDateChangeEvent;
@@ -72,7 +72,6 @@
private String toolTipMode;
private String label;
private String timeZone;
- private String mode;
private int zindex;
private int counter;
@@ -120,13 +119,6 @@
this.pattern = pattern;
}
- public void selectPattern(ValueChangeEvent event) {
- String tPatern = (String) event.getNewValue();
- if (tPatern != null) {
- pattern = tPatern;
- }
- }
-
public CalendarBean() {
height = "400px";
width = "400px";
@@ -149,14 +141,12 @@
required = false;
weekDay = "long";
month = "none";
- mode = "client";
timeZone = "Eastern European Time";
preloadDateRangeBegin = "10.08.2007"; //d.m.y
preloadDateRangeEnd = "11.10.2007";
}
public Date getPrDateRangeBegin() {
- if("ajax".equals(mode)) return null;
Calendar cal = Calendar.getInstance();
StringTokenizer st = new StringTokenizer(preloadDateRangeBegin,".");
ArrayList<Integer> date = new ArrayList<Integer>();
@@ -169,7 +159,6 @@
}
public Date getPrDateRangeEnd() {
- if("ajax".equals(mode)) return null;
Calendar cal = Calendar.getInstance();
StringTokenizer st = new StringTokenizer(preloadDateRangeEnd, ".");
ArrayList<Integer> date = new ArrayList<Integer>();
@@ -205,15 +194,6 @@
this.readonly = readonly;
}
- public void selectLocale(ValueChangeEvent event) {
- String tLocale = (String) event.getNewValue();
- if (tLocale != null) {
- String lang = tLocale.substring(0, 2);
- String country = tLocale.substring(3);
- locale = new Locale(lang, country, "");
- }
- }
-
public Object getWeekDayLabels() {
if(weekDay.equals("long"))
return CalendarBean.WEEK_DAY;
@@ -281,9 +261,6 @@
this.jointPoint = jointPoint;
}
- public void selectJointPoint(ValueChangeEvent event) {
- jointPoint = (String) event.getNewValue();
- }
public String getDirection() {
return direction;
@@ -293,10 +270,6 @@
this.direction = direction;
}
- public void selectDirection(ValueChangeEvent event) {
- direction = (String) event.getNewValue();
- }
-
public String getBoundary() {
return boundary;
}
@@ -307,6 +280,7 @@
public void dcl(CurrentDateChangeEvent event) {
System.out.println(event.getCurrentDateString());
+ System.out.println("ajvhckndskncs");
}
public void ddd(ValueChangeEvent event) {
@@ -431,14 +405,6 @@
this.preloadDateRangeEnd = preloadDateRangeEnd;
}
- public String getMode() {
- return mode;
- }
-
- public void setMode(String mode) {
- this.mode = mode;
- }
-
public String getWeekDay() {
return weekDay;
}
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java
===================================================================
---
trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-10
16:08:39 UTC (rev 3314)
+++
trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-10
16:09:21 UTC (rev 3315)
@@ -22,10 +22,12 @@
package calendar;
import java.text.DateFormat;
+import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Random;
import org.richfaces.model.CalendarDataModel;
import org.richfaces.model.CalendarDataModelItem;
@@ -62,8 +64,20 @@
data.put("enLabel", enFormatter.format(date));
data.put("frLabel", frFormatter.format(date));
data.put("deLabel", deFormatter.format(date));
+ /*Calendar c = Calendar.getInstance();
+ c.setTime(date);
+ item.setDay(c.get(Calendar.DAY_OF_MONTH));*/
+
+ if (new Random().nextInt(10) > 5) {
+ item.setEnabled(true);
+ } else {
+ item.setEnabled(false);
+ }
+
item.setData(data);
-
+
+ System.out.println(item.getData() + " " + item.isEnabled());
+
return item;
}
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarValidator.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarValidator.java 2007-10-10
16:08:39 UTC (rev 3314)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarValidator.java 2007-10-10
16:09:21 UTC (rev 3315)
@@ -1,3 +1,6 @@
+/**
+ *
+ */
package calendar;
import java.util.Calendar;
Show replies by date