Author: ayanul
Date: 2007-09-17 09:55:56 -0400 (Mon, 17 Sep 2007)
New Revision: 2954
Modified:
trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java
trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
Log:
fix timeZone
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java 2007-09-17
13:50:11 UTC (rev 2953)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java 2007-09-17
13:55:56 UTC (rev 2954)
@@ -33,14 +33,14 @@
public class CalendarBean {
- private static final String[] WEEK_DAY_SHORT = new String[] { "Sun *",
+ private static final String [] WEEK_DAY_SHORT = new String[] { "Sun *",
"Mon +", "Tue +", "Wed +", "Thu +", "Fri
+", "Sat *" };
- private static final String[] WEEK_DAY = new String[] { "Monday",
+ private static final String [] WEEK_DAY = new String[] { "Monday",
"Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday", "Sunday" };
- private static final String[] MOUNT_LABELS = new String[] { "January",
+ private static final String [] MOUNT_LABELS = new String[] { "January",
"February", "March", "April", "May",
"June", "July", "August",
"September", "October", "November", "December"
};
- private static final String[] MOUNT_LABELS_SHORT = new String[] { "Jan +",
+ private static final String [] MOUNT_LABELS_SHORT = new String[] { "Jan +",
"Feb +", "Mar +", "Apr +", "May +", "Jun
+", "Jul +", "Aug +",
"Sep +", "Oct +", "Nov +", "Dec +" };
@@ -70,16 +70,16 @@
private String toolTipMode;
private String scrollMode;
private String label;
-
- private TimeZone timeZone;
+ private String timeZone;
private int zindex;
private int counter;
+
- public TimeZone getTimeZone() {
+ public String getTimeZone() {
return timeZone;
}
- public void setTimeZone(TimeZone timeZone) {
+ public void setTimeZone(String timeZone) {
this.timeZone = timeZone;
}
@@ -148,7 +148,7 @@
required = false;
weekDay = "none";
month = "none";
- timeZone = TimeZone.getDefault();
+ timeZone = "Eastern European Time";
preloadDateRangeBegin = new Date("January 01, 2007");
preloadDateRangeEnd = new Date();
}
@@ -404,4 +404,12 @@
public void setPreloadDateRangeEnd(Date preloadDateRangeEnd) {
this.preloadDateRangeEnd = preloadDateRangeEnd;
}
+
+ public TimeZone getTmZone() {
+ TimeZone tZone = TimeZone.getDefault();
+ System.out.println("timeZone" + timeZone + " tZone " + tZone);
+ tZone.setID(timeZone);
+ System.out.println("timeZone" + timeZone + " tZone " + tZone);
+ return tZone;
+ }
}
Modified: trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-09-17
13:50:11 UTC (rev 2953)
+++ trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-09-17
13:55:56 UTC (rev 2954)
@@ -52,7 +52,7 @@
scrollMode="#{calendarBean.scrollMode}"
rendered="#{calendarBean.rendered}"
focus="popupModeID"
- timeZone="#{calendarBean.timeZone}"
+ timeZone="#{calendarBean.tmZone}"
required="#{calendarBean.required}"
requiredMessage="Required Message">
<f:facet name="optionalHeader">
@@ -168,9 +168,9 @@
<h:outputText value="Time Zone:" />
<h:selectOneRadio value="#{calendarBean.timeZone}"
onchange="submit();">
- <f:selectItem itemLabel="GMT+20:00" itemValue="GMT+20:00"/>
- <f:selectItem itemLabel="GMT+50:00" itemValue="GMT+50:00"/>
- <f:selectItem itemLabel="GMT+90:00" itemValue="GMT+90:00"/>
+ <f:selectItem itemLabel="Eastern European Time" itemValue="Eastern
European Time"/>
+ <f:selectItem itemLabel="Turkmenistan Time" itemValue="Turkmenistan
Time"/>
+ <f:selectItem itemLabel="Korea Standard Time" itemValue="Korea
Standard Time"/>
</h:selectOneRadio>
@@ -221,6 +221,8 @@
<f:verbatim></f:verbatim>
<h:commandButton value="Submit" />
+
+ <rich:messages showDetail="true"></rich:messages>
</h:panelGrid>
<f:verbatim>