Author: akushunin
Date: 2007-11-23 11:04:14 -0500 (Fri, 23 Nov 2007)
New Revision: 4225
Modified:
trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
Log:
Sample changes related with RF-1192
Modified: trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
===================================================================
--- trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2007-11-23
16:02:37 UTC (rev 4224)
+++ trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2007-11-23
16:04:14 UTC (rev 4225)
@@ -47,6 +47,7 @@
private boolean showInput;
private boolean enableManualInput;
private boolean disabled;
+ private boolean showApplyButton;
private String pattern;
private Date currentDate;
private Date selectedDate;
@@ -56,6 +57,9 @@
private int counter;
+
+
+
private boolean useCustomDayLabels;
public Locale getLocale() {
@@ -102,6 +106,7 @@
showInput=true;
boundary = "inactive";
disabled = false;
+
}
@@ -233,4 +238,12 @@
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
+
+ public boolean isShowApplyButton() {
+ return showApplyButton;
+ }
+
+ public void setShowApplyButton(boolean showApplyButton) {
+ this.showApplyButton = showApplyButton;
+ }
}
\ No newline at end of file
Modified: trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
===================================================================
--- trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-11-23 16:02:37
UTC (rev 4224)
+++ trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-11-23 16:04:14
UTC (rev 4225)
@@ -66,7 +66,8 @@
verticalOffset="3"
cellHeight="50"
cellWidth="50"
- mode="ajax">
+ mode="ajax"
+ showApplyButton="#{calendarBean.showApplyButton}">
<f:facet name="optionalHeader">
<h:outputText value="optionalHeader Facet" />
</f:facet>
@@ -100,12 +101,16 @@
<h:selectBooleanCheckbox value="#{calendarBean.popup}"
onclick="submit()"/>
<h:outputText value="Custom day labels:" />
<h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}"
onclick="submit()"/>
+ <h:outputText value="Show Apply Button:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.showApplyButton}"
onclick="submit()"/>
<h:outputText value="Select Date Pattern:"/>
<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"/>
- <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d,
yyyy"/>
+ <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d,
yyyy"/>
+ <f:selectItem itemLabel="dd/M/yy HH:mm" itemValue="dd/M/yy
HH:mm"/>
+ <f:selectItem itemLabel="MMM d, yyyy h:mm a" itemValue="MMM d,
yyyy h:mm a"/>
</h:selectOneMenu>
<h:inputText id="selectdate"/><h:commandButton
type="button" value="Select Date"
onclick="$(this.form.id+':calendar').component.selectDate(this.form[this.form.id+':selectdate'].value);"/>
<h:outputText value="Select Popup Joint Point:" />
Show replies by date