blob: 42cb239cf641e469b506032eda06fbcff13a6065 [file] [log] [blame]
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<jsp:root version="1.2" xmlns:tr="http://myfaces.apache.org/trinidad"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:jsp="http://java.sun.com/JSP/Page">
<jsp:directive.page contentType="text/html;charset=utf-8"/>
<f:view>
<tr:document title="Trinidad DateRestrictionValidator">
<tr:form>
<tr:panelPage>
<tr:messages/>
<f:facet name="navigationGlobal">
<tr:navigationPane hint="buttons">
<tr:commandNavigationItem text="Validators and Converters"
action="convertValidateDemos"
immediate="true"/>
</tr:navigationPane>
</f:facet>
<tr:panelHeader text="Date Restriction Validator">
<tr:panelFormLayout>
<tr:inputDate id="days" value="#{dateRestrictionValidator.testInvalidDays}"
label="Select a date!">
<f:facet name="help">
<tr:outputText value="Ensures, that #{dateRestrictionValidator.country} holidays are not selectable"/>
</f:facet>
<tr:convertDateTime pattern="yyyy-MM-dd"/>
<tr:validateDateRestriction invalidDays="#{dateRestrictionValidator.nationalHolidays}" />
</tr:inputDate>
<tr:inputDate id="month" value="#{dateRestrictionValidator.testInvalidMonth}"
label="Select a date!">
<f:facet name="help">
<tr:outputText value="November/December dates are not allowed here!"/>
</f:facet>
<tr:convertDateTime pattern="yyyy-MM-dd"/>
<tr:validateDateRestriction invalidMonths="Nov Dec" />
</tr:inputDate>
<tr:inputDate id="daysOfWeek" value="#{dateRestrictionValidator.testInvalidDaysOfWeek}"
label="Select a date!">
<f:facet name="help">
<tr:outputText value="Please no Mondays...!"/>
</f:facet>
<tr:convertDateTime pattern="yyyy-MM-dd"/>
<tr:validateDateRestriction invalidDaysOfWeek="Mon"/>
</tr:inputDate>
</tr:panelFormLayout>
</tr:panelHeader>
<tr:commandButton text="Submit"/>
</tr:panelPage>
</tr:form>
</tr:document>
</f:view>
</jsp:root>