<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<f:subview id="calendarSubviewID">

	<h:messages />
	<rich:messages showDetail="true"></rich:messages>

	<h:panelGrid columns="2">
		<h:outputText value="Client mode" rendered="#{calendarBean.renderedClient}" />
		<h:outputText value="Ajax mode" rendered="#{calendarBean.renderedAjax}" />

		<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="calendarPropertyID,counter"
			inputClass="ic" buttonClass="bc" ajaxSingle="#{calendarBean.ajaxSingle}" buttonIcon="#{calendarBean.icon}"
			buttonIconDisabled="#{icon.iconFileManagerReject}" disabled="#{calendarBean.disabled}"
			bypassUpdates="#{calendarBean.bypassUpdates}" zindex="#{calendarBean.zindex}" toolTipMode="#{calendarBean.toolTipMode}"
			rendered="#{calendarBean.renderedClient}" focus="popupModeID" mode="client" required="#{calendarBean.required}"
			requiredMessage="Required Message" timeZone="#{calendarBean.tmZone}" cellHeight="#{calendarBean.cellHeight}"
			cellWidth="#{calendarBean.cellWidth}" showApplyButton="#{calendarBean.showApplyButton}"
			showScrollerBar="#{calendarBean.showScrollerBar}" showWeekDaysBar="#{calendarBean.showWeekDaysBar}"
			showWeeksBar="#{calendarBean.showWeeksBar}" todayControlMode="#{calendarBean.todayControlMode}" 
			immediate="#{calendarBean.immediate}">
			<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" />

			<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="calendarPropertyID,counter" inputClass="ic" buttonClass="bc"
			ajaxSingle="#{calendarBean.ajaxSingle}" buttonIcon="#{calendarBean.icon}" buttonIconDisabled="#{icon.iconFileManagerReject}"
			disabled="#{calendarBean.disabled}" bypassUpdates="#{calendarBean.bypassUpdates}" zindex="#{calendarBean.zindex}"
			toolTipMode="#{calendarBean.toolTipMode}" rendered="#{calendarBean.renderedAjax}" focus="popupModeID" mode="ajax"
			required="#{calendarBean.required}" requiredMessage="Required Message" timeZone="#{calendarBean.tmZone}">
			<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" />

			<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:subview>
