Author: ayanul
Date: 2007-10-11 10:46:43 -0400 (Thu, 11 Oct 2007)
New Revision: 3330
Modified:
trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
Log:
Modified: trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-10-11
14:35:58 UTC (rev 3329)
+++ trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-10-11
14:46:43 UTC (rev 3330)
@@ -3,76 +3,134 @@
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html">
-
<rich:messages showDetail="true"></rich:messages>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Client mode" />
+ <h:outputText value="Ajax mode" />
- <f:verbatim>
- <br />
- </f:verbatim>
-
- <rich:calendar id="calendarID" dataModel="#{calendarDataModel}"
- locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
- datePattern="#{calendarBean.pattern}"
- weekDayLabels="#{calendarBean.weekDayLabels}"
- weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
- monthLabels="#{calendarBean.monthLabels}"
- monthLabelsShort="#{calendarBean.monthLabelsShort}"
- value="#{calendarBean.selectedDate}"
- currentDate="#{calendarBean.currentDate}"
- jointPoint="#{calendarBean.jointPoint}"
- direction="#{calendarBean.direction}"
- enableManualInput="#{calendarBean.enableManualInput}"
- showInput="#{calendarBean.showInput}"
buttonLabel="#{calendarBean.label}"
- boundaryDatesMode="#{calendarBean.boundary}"
- currentDateChangeListener="#{calendarBean.dcl}"
- valueChangeListener="#{calendarBean.ddd}" reRender="counter"
- inputClass="ic" buttonClass="bc"
- ajaxSingle="#{calendarBean.ajaxSingle}"
- buttonIcon="#{calendarBean.icon}"
- buttonIconDisabled="#{icon.iconFileManagerReject}"
- disabled="#{calendarBean.disabled}"
- bypassUpdates="#{calendarBean.bypassUpdates}"
- height="#{calendarBean.height}"
- width="#{calendarBean.width}"
- zindex="#{calendarBean.zindex}"
- toolTipMode="#{calendarBean.toolTipMode}"
- rendered="#{calendarBean.rendered}"
- focus="popupModeID"
- mode="#{calendarBean.mode}"
- required="#{calendarBean.required}"
- requiredMessage="Required Message"
- >
+ <rich:calendar id="calendarClientID"
dataModel="#{calendarDataModel}"
+ locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
+ preloadDateRangeBegin="#{calendarBean.prDateRangeBegin}"
+ preloadDateRangeEnd="#{calendarBean.prDateRangeEnd}"
+ datePattern="#{calendarBean.pattern}"
+ weekDayLabels="#{calendarBean.weekDayLabels}"
+ weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
+ monthLabels="#{calendarBean.monthLabels}"
+ monthLabelsShort="#{calendarBean.monthLabelsShort}"
+ value="#{calendarBean.selectedDate}"
+ currentDate="#{calendarBean.currentDate}"
+ jointPoint="#{calendarBean.jointPoint}"
+ direction="#{calendarBean.direction}"
+ enableManualInput="#{calendarBean.enableManualInput}"
+ showInput="#{calendarBean.showInput}"
buttonLabel="#{calendarBean.label}"
+ boundaryDatesMode="#{calendarBean.boundary}"
+ currentDateChangeListener="#{calendarBean.dcl}"
+ valueChangeListener="#{calendarBean.ddd}" reRender="counter"
+ inputClass="ic" buttonClass="bc"
+ ajaxSingle="#{calendarBean.ajaxSingle}"
+ buttonIcon="#{calendarBean.icon}"
+ buttonIconDisabled="#{icon.iconFileManagerReject}"
+ disabled="#{calendarBean.disabled}"
+ bypassUpdates="#{calendarBean.bypassUpdates}"
+ height="#{calendarBean.height}"
+ width="#{calendarBean.width}"
+ zindex="#{calendarBean.zindex}"
+ toolTipMode="#{calendarBean.toolTipMode}"
+ rendered="#{calendarBean.rendered}"
+ focus="popupModeID"
+ mode="client"
+ required="#{calendarBean.required}"
+ requiredMessage="Required Message"
+ >
+ <f:facet name="weekDay">
+ <f:verbatim><span style="padding: 2px; font-size: 4"
>{weekDayLabel + weekDayLabelShort}</span></f:verbatim>
+ </f:facet>
+
+ <f:facet name="optionalHeader">
+ <h:outputText value="optionalHeader Facet" />
+ </f:facet>
+
+ <f:facet name="optionalFooter">
+ <h:outputText value="optionalFooter Facet" />
+ </f:facet>
+
+ <f:validator validatorId="org.richfaces.CalendarValidator" />
- <f:facet name="weekDay">
- <f:verbatim><span style="padding: 2px; font-size: 4"
>{weekDayLabel + weekDayLabelShort}</span></f:verbatim>
- </f:facet>
-
- <f:facet name="optionalHeader">
- <h:outputText value="optionalHeader Facet" />
- </f:facet>
+ <h:panelGrid columns="2">
+ <f:verbatim>
+ <span style="padding: 2px;">{day}</span>
+ </f:verbatim>
+ <h:panelGrid>
+ <h:outputText styleClass="smallText" value="{data.enLabel}"
/>
+ <h:outputText styleClass="smallText" value="{data.frLabel}"
/>
+ <h:outputText styleClass="smallText" value="{data.deLabel}"
/>
+ </h:panelGrid>
+ </h:panelGrid>
+ </rich:calendar>
+ <rich:calendar id="calendarAjaxID"
dataModel="#{calendarDataModel}"
+ locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
+ datePattern="#{calendarBean.pattern}"
+ weekDayLabels="#{calendarBean.weekDayLabels}"
+ weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
+ monthLabels="#{calendarBean.monthLabels}"
+ monthLabelsShort="#{calendarBean.monthLabelsShort}"
+ value="#{calendarBean.selectedDate}"
+ currentDate="#{calendarBean.currentDate}"
+ jointPoint="#{calendarBean.jointPoint}"
+ direction="#{calendarBean.direction}"
+ enableManualInput="#{calendarBean.enableManualInput}"
+ showInput="#{calendarBean.showInput}"
buttonLabel="#{calendarBean.label}"
+ boundaryDatesMode="#{calendarBean.boundary}"
+ currentDateChangeListener="#{calendarBean.dcl}"
+ valueChangeListener="#{calendarBean.ddd}" reRender="counter"
+ inputClass="ic" buttonClass="bc"
+ ajaxSingle="#{calendarBean.ajaxSingle}"
+ buttonIcon="#{calendarBean.icon}"
+ buttonIconDisabled="#{icon.iconFileManagerReject}"
+ disabled="#{calendarBean.disabled}"
+ bypassUpdates="#{calendarBean.bypassUpdates}"
+ height="#{calendarBean.height}"
+ width="#{calendarBean.width}"
+ zindex="#{calendarBean.zindex}"
+ toolTipMode="#{calendarBean.toolTipMode}"
+ rendered="#{calendarBean.rendered}"
+ focus="popupModeID"
+ mode="ajax"
+ required="#{calendarBean.required}"
+ requiredMessage="Required Message">
+ <f:facet name="weekDay">
+ <f:verbatim><span style="padding: 2px; font-size: 4"
>{weekDayLabel + weekDayLabelShort}</span></f:verbatim>
+ </f:facet>
+
+ <f:facet name="optionalHeader">
+ <h:outputText value="optionalHeader Facet" />
+ </f:facet>
+
+ <f:facet name="optionalFooter">
+ <h:outputText value="optionalFooter Facet" />
+ </f:facet>
+
+ <f:validator validatorId="org.richfaces.CalendarValidator" />
- <f:facet name="optionalFooter">
- <h:outputText value="optionalFooter Facet" />
- </f:facet>
+ <h:panelGrid columns="2">
+ <f:verbatim>
+ <span style="padding: 2px;">{day}</span>
+ </f:verbatim>
+ <h:panelGrid>
+ <h:outputText styleClass="smallText" value="{data.enLabel}"
/>
+ <h:outputText styleClass="smallText" value="{data.frLabel}"
/>
+ <h:outputText styleClass="smallText" value="{data.deLabel}"
/>
+ </h:panelGrid>
+ </h:panelGrid>
+ </rich:calendar>
+ </h:panelGrid>
- <f:validator validatorId="org.richfaces.CalendarValidator" />
+
<h:panelGrid columns="2">
- <f:verbatim>
- <span style="padding: 2px;">{day}</span>
- </f:verbatim>
- <h:panelGrid>
- <h:outputText styleClass="smallText" value="{data.enLabel}"
/>
- <h:outputText styleClass="smallText" value="{data.frLabel}"
/>
- <h:outputText styleClass="smallText" value="{data.deLabel}"
/>
- </h:panelGrid>
- </h:panelGrid>
- </rich:calendar>
-
- <h:panelGrid columns="2">
<h:outputText value="Select Locale:" />
- <h:selectOneRadio onchange="submit()" value="en/US"
- valueChangeListener="#{calendarBean.selectLocale}">
+ <h:selectOneRadio onchange="submit()" value="en/US">
<f:selectItem itemLabel="US" itemValue="en/US" />
<f:selectItem itemLabel="DE" itemValue="de/DE" />
<f:selectItem itemLabel="FR" itemValue="fr/FR" />
@@ -88,7 +146,7 @@
<f:selectItem itemLabel="none" itemValue="none"/>
<f:selectItem itemLabel="day labels" itemValue="long"/>
<f:selectItem itemLabel="day labels short"
itemValue="short"/>
- <a4j:support event="onclick"
reRender="calendarID"></a4j:support>
+ <a4j:support event="onclick"
reRender="calendarClientID,calendarAjaxID"></a4j:support>
</h:selectOneRadio>
<h:outputText value="Custom month labels" />
@@ -96,12 +154,11 @@
<f:selectItem itemLabel="none" itemValue="none"/>
<f:selectItem itemLabel="day labels" itemValue="long"/>
<f:selectItem itemLabel="day labels short"
itemValue="short"/>
- <a4j:support event="onclick"
reRender="calendarID"></a4j:support>
+ <a4j:support event="onclick"
reRender="calendarClientID,calendarAjaxID"></a4j:support>
</h:selectOneRadio>
<h:outputText value="Select Date Pattern:" />
- <h:selectOneMenu value="MMM d, yyyy" onchange="submit()"
- valueChangeListener="#{calendarBean.selectPattern}">
+ <h:selectOneMenu value="MMM d, yyyy" onchange="submit()">
<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" />
@@ -113,12 +170,6 @@
<h:commandButton type="button" value="Select Date"
onclick="$(this.form.id+':calendarID').component.selectDate(this.form[this.form.id+':selectdate'].value);"
/>
- <h:outputText value="Mode:" />
- <h:selectOneRadio value="#{calendarBean.mode}"
onclick="submit();">
- <f:selectItem itemLabel="client" itemValue="client"/>
- <f:selectItem itemLabel="ajax" itemValue="ajax"/>
- </h:selectOneRadio>
-
<h:outputText value="Preload date range begin(d.m.y)" />
<h:inputText value="#{calendarBean.preloadDateRangeBegin}"
onchange="submit();"/>
@@ -127,17 +178,17 @@
<h:outputText value="z-index:" />
<h:inputText value="#{calendarBean.zindex}">
- <a4j:support event="onchange"
reRender="calendarID"></a4j:support>
+ <a4j:support event="onchange"
reRender="calendarClientID,calendarAjaxID"></a4j:support>
</h:inputText>
<h:outputText value="Height:" />
<h:inputText value="#{calendarBean.height}">
- <a4j:support event="onchange"
reRender="calendarID"></a4j:support>
+ <a4j:support event="onchange"
reRender="calendarClientID,calendarAjaxID"></a4j:support>
</h:inputText>
<h:outputText value="Width:" />
<h:inputText value="#{calendarBean.width}">
- <a4j:support event="onchange"
reRender="calendarID"></a4j:support>
+ <a4j:support event="onchange"
reRender="calendarClientID,calendarAjaxID"></a4j:support>
</h:inputText>
<h:outputText value="reRender (counter):" />
@@ -148,8 +199,7 @@
<h:outputText value="Select Popup Joint Point:" />
<h:selectOneRadio onchange="submit()"
- value="#{calendarBean.jointPoint}"
- valueChangeListener="#{calendarBean.selectJointPoint}">
+ value="#{calendarBean.jointPoint}">
<f:selectItem itemLabel="bottom-right" itemValue="bottom-right"
/>
<f:selectItem itemLabel="bottom-left" itemValue="bottom-left"
/>
<f:selectItem itemLabel="top-right" itemValue="top-right"
/>
@@ -158,8 +208,7 @@
<h:outputText value="Select Popup Direction:" />
<h:selectOneRadio onchange="submit()"
- value="#{calendarBean.direction}"
- valueChangeListener="#{calendarBean.selectDirection}">
+ value="#{calendarBean.direction}">
<f:selectItem itemLabel="bottom-right" itemValue="bottom-right"
/>
<f:selectItem itemLabel="bottom-left" itemValue="bottom-left"
/>
<f:selectItem itemLabel="top-right" itemValue="top-right"
/>
@@ -217,9 +266,5 @@
<f:verbatim></f:verbatim>
<h:commandButton value="Submit" />
</h:panelGrid>
-
- <f:verbatim>
- <br />
- </f:verbatim>
</h:form>