[richfaces-svn-commits] JBoss Rich Faces SVN: r4766 - in branches/3.1.x/samples/richfaces-demo/src/main: webapp/richfaces/calendar and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Dec 12 06:15:24 EST 2007


Author: ilya_shaikovsky
Date: 2007-12-12 06:15:23 -0500 (Wed, 12 Dec 2007)
New Revision: 4766

Modified:
   branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java
   branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
   branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml
Log:
calendar apply added

Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java	2007-12-12 11:01:23 UTC (rev 4765)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java	2007-12-12 11:15:23 UTC (rev 4766)
@@ -12,7 +12,7 @@
 	private boolean popup;
 	private String pattern;
 	private Date selectedDate;
-
+	private boolean showApply=true;
 	private boolean useCustomDayLabels;
 
 	public Locale getLocale() {
@@ -72,4 +72,12 @@
 		this.selectedDate = selectedDate;
 	}
 
+	public boolean isShowApply() {
+		return showApply;
+	}
+
+	public void setShowApply(boolean showApply) {
+		this.showApply = showApply;
+	}
+
 }
\ No newline at end of file

Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml	2007-12-12 11:01:23 UTC (rev 4765)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml	2007-12-12 11:15:23 UTC (rev 4766)
@@ -18,7 +18,7 @@
 						locale="#{calendarBean.locale}"
 						popup="#{calendarBean.popup}"
 						datePattern="#{calendarBean.pattern}"
-					 />
+					 	showApplyButton="true"/>
 			</a4j:outputPanel>
 		
 		
@@ -27,7 +27,10 @@
 				<h:selectBooleanCheckbox value="#{calendarBean.popup}">
 					<a4j:support event="onclick"  reRender="calendar"/>						
 				</h:selectBooleanCheckbox>
-					
+				<h:outputText value="Apply Button:" />
+				<h:selectBooleanCheckbox value="#{calendarBean.showApply}">
+					<a4j:support event="onclick"  reRender="calendar"/>						
+				</h:selectBooleanCheckbox>
 				<h:outputText value="Select Locale" />
 				<h:selectOneRadio value="en/US" valueChangeListener="#{calendarBean.selectLocale}">
 					<a4j:support event="onclick" reRender="calendar"/>

Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml	2007-12-12 11:01:23 UTC (rev 4765)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml	2007-12-12 11:15:23 UTC (rev 4766)
@@ -32,6 +32,9 @@
 				After you choose some date - you'll be able to manage time for this date. Spinner will be called
 				after click on the time fields to edit them.
 			</p>
+			<p>
+				Calendar could be used without "Apply" button(will be closed after date selected)
+			</p>
 			<p>
 			<b>locale</b> attribute is defined as a Locale. The default value is set to the Locale of the current page.
 			The name of the month and week days names depend of the Locale. 




More information about the richfaces-svn-commits mailing list