Author: ayanul
Date: 2007-08-28 10:04:11 -0400 (Tue, 28 Aug 2007)
New Revision: 2537
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
Log:
http://jira.jboss.com/jira/browse/RF-673?page=all
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-08-28
14:04:02 UTC (rev 2536)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-08-28
14:04:11 UTC (rev 2537)
@@ -74,9 +74,17 @@
}
public void setPattern(String pattern) {
+
this.pattern = pattern;
}
+ public void selectPattern(ValueChangeEvent event) {
+ String tPatern = (String) event.getNewValue();
+ if (tPatern != null) {
+ pattern = tPatern;
+ }
+ }
+
public CalendarBean() {
locale = Locale.US;
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-08-28 14:04:02
UTC (rev 2536)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-08-28 14:04:11
UTC (rev 2537)
@@ -29,7 +29,7 @@
</a4j:outputPanel>
<h:form>
<rich:calendar
- id="calendar"
+ id="calendar"
data="#{calendarDataModel}"
locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}"
@@ -74,7 +74,8 @@
<h:outputText value="Custom day labels:" />
<h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}"
onclick="submit()"/>
<h:outputText value="Select Date Pattern:"/>
- <h:selectOneMenu value="#{calendarBean.pattern}"
onchange="submit()">
+
+ <h:selectOneMenu value="MMM d, yyyy" onchange="submit()"
valueChangeListener="#{calendarBean.selectPattern}">
<f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy"/>
<f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy"/>
<f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y"/>