Author: ilya_shaikovsky
Date: 2010-10-31 13:35:36 -0400 (Sun, 31 Oct 2010)
New Revision: 19804
Modified:
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/calendar.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples/calendar-sample.xhtml
Log:
https://jira.jboss.org/browse/RF-9175
Modified:
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-10-31
17:23:23 UTC (rev 19803)
+++
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-10-31
17:35:36 UTC (rev 19804)
@@ -401,7 +401,7 @@
<group>
<name>Inputs and Selects</name>
<demos>
- <demo>
+ <demo new="true">
<id>autocomplete</id>
<name>rich:autocomplete</name>
<samples>
@@ -409,13 +409,13 @@
<id>cachedAjax</id>
<name>Autocomplete in Cached Ajax mode</name>
</sample>
- <sample>
+ <sample new="true">
<id>clientFilter</id>
<name>Custom client filter</name>
</sample>
</samples>
</demo>
- <!--demo>
+ <demo new="true">
<id>calendar</id>
<name>rich:calendar</name>
<samples>
@@ -424,7 +424,7 @@
<name>Simple Calendar</name>
</sample>
</samples>
- </demo-->
+ </demo>
<demo>
<id>inputNumberSlider</id>
<name>rich:inputNumberSlider</name>
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/calendar.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/calendar.xhtml 2010-10-31
17:23:23 UTC (rev 19803)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/calendar.xhtml 2010-10-31
17:35:36 UTC (rev 19804)
@@ -5,7 +5,11 @@
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition>
- <p>DESC</p>
+ <p><b>rich:calendar</b> allows to select the date using monthly
calendar
+ elements on pages. It is possible to use the component in a <b>popup or
+ inline mode.</b> At a popup mode Calendar is initially rendered as input for
+ date and button on the right side to call a popup. In case of an inline
+ mode, the monthly calendar is located on a page initially.</p>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
<ui:include src="/templates/includes/source-view.xhtml">
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples/calendar-sample.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples/calendar-sample.xhtml 2010-10-31
17:23:23 UTC (rev 19803)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples/calendar-sample.xhtml 2010-10-31
17:35:36 UTC (rev 19804)
@@ -5,10 +5,66 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <rich:panel style="width:220px;">
- <f:facet name="header">
- <h:outputText value="Calendar"></h:outputText>
- </f:facet>
- <rich:calendar />
- </rich:panel>
+ <style type="text/css">
+.ecol1 {
+ vertical-align: top;
+ padding-right: 25px
+}
+
+.ecol2 {
+ vertical-align: top;
+ border-left: #ACBECE 1px solid;
+ padding-left: 10px
+}
+
+.rich-calendar-tool-btn {
+ font-family: Arial, Verdana;
+}
+</style>
+ <h:form>
+
+ <h:panelGrid id="panel" columns="2" columnClasses="ecol1,
ecol2">
+ <a4j:outputPanel id="calendar" layout="block">
+ <rich:calendar value="#{calendarBean.selectedDate}"
+ locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
+ datePattern="#{calendarBean.pattern}"
+ showApplyButton="#{calendarBean.showApply}" cellWidth="24px"
+ cellHeight="22px" style="width:200px">
+ <f:convertDateTime pattern="#{calendarBean.pattern}" />
+ </rich:calendar>
+ </a4j:outputPanel>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Popup Mode:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.popup}">
+ <a4j:ajax event="click" render="calendar" />
+ </h:selectBooleanCheckbox>
+ <h:outputText value="Apply Button:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.showApply}">
+ <a4j:ajax event="click" render="calendar" />
+ </h:selectBooleanCheckbox>
+ <h:outputText value="Select Locale" />
+ <h:selectOneRadio value="en/US"
+ valueChangeListener="#{calendarBean.selectLocale}">
+ <a4j:ajax event="click" render="calendar" />
+ <f:selectItem itemLabel="US" itemValue="en/US" />
+ <f:selectItem itemLabel="DE" itemValue="de/DE" />
+ <f:selectItem itemLabel="FR" itemValue="fr/FR" />
+ <f:selectItem itemLabel="RU" itemValue="ru/RU" />
+ </h:selectOneRadio>
+
+ <h:outputText value="Select Date Pattern:" />
+ <h:selectOneMenu value="#{calendarBean.pattern}">
+ <a4j:ajax event="change" render="calendar" />
+ <f:selectItem itemLabel="d/M/yy HH:mm" itemValue="d/M/yy
HH:mm" />
+ <f:selectItem itemLabel="dd/M/yy hh:mm a"
+ itemValue="dd/M/yy hh:mm a" />
+ <f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y" />
+ <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy"
/>
+ </h:selectOneMenu>
+
+ </h:panelGrid>
+
+ </h:panelGrid>
+ </h:form>
</ui:composition>
\ No newline at end of file