You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/11/26 19:35:07 UTC
svn commit: r1039499 [3/3] - in /myfaces/commons/branches/jsf_11/examples:
./ myfaces-commons-examples/
myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/
myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/exampl...
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,75 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mcc="http://myfaces.apache.org/commons/converters"
+ xmlns:mc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:panelGroup id="body">
+ <p>This example shows how mcc:convertNumber component works. It works almost
+ the same as f:convertNumber, but it has "destType" attribute that define the
+ target attribute to the backing bean property (useful when maps are used because
+ ValueExpression.getType return null) and it evaluate EL expressions when the value
+ is being validated instead when the converter is built. </p>
+ <p>Current Locale: <h:outputText value="#{facesContext.viewRoot.locale}"/></p>
+ <h:form id="form1">
+ <h:messages showDetail="false" showSummary="true" ></h:messages>
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="type"
+ value="Insert a type" />
+ <h:selectOneMenu id="type" immediate="true" value="#{numberBean.type}" >
+ <f:selectItem itemLabel="number" itemValue="number"/>
+ <f:selectItem itemLabel="currency" itemValue="currency"/>
+ <f:selectItem itemLabel="percent" itemValue="percent"/>
+ </h:selectOneMenu>
+ <h:message for="type" styleClass="error" />
+
+ <h:outputLabel for="number1"
+ value="Insert a number" />
+ <h:inputText id="number1" value="#{numberBean.numberMap['number1']}" required="true">
+ <mcc:convertNumber destType="java.lang.Double" type="#{mc:findComponent('form1:type').value}"/>
+ </h:inputText>
+ <h:message for="number1" styleClass="error" />
+
+ <h:panelGroup />
+ <h:commandButton id="validateButton"
+ value="#{example_messages['button_submit']}"
+ action="#{numberBean.submit}" />
+ <h:panelGroup />
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,77 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mc="http://myfaces.apache.org/commons/converters"
+ xmlns:mcc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+
+ <ui:define name="body">
+ <h:messages showDetail="true" showSummary="false"/>
+
+ <h:form id="myform">
+ <p>Some valid test numbers</p>
+
+ <ul>
+ <li>Mastercard : 5555555555554444</li>
+ <li>Mastercard : 5105105105105100</li>
+ <li>Visa : 4111111111111111</li>
+ <li>Visa : 4111111111111111</li>
+ <li>Discover : 6011111111111117</li>
+ <li>Discover : 6011000990139424</li>
+ <li>American Express : 378282246310005</li>
+ <li>American Express : 371449635398431</li>
+ </ul>
+
+ <h:panelGrid columns ="3">
+ <h:outputLabel for="creditCardType" value="#{example_messages['credit_type']}" />
+ <h:selectOneRadio id="creditCardType" value="#{validateCreditCard.creditCardType}" immediate="true">
+ <f:selectItems value="#{validateCreditCard.creditCardTypes}"/>
+ </h:selectOneRadio>
+ <h:message id="creditCardTypeError" for="creditCardType" styleClass="error" />
+
+ <h:outputLabel for="creditCardNumber" value="#{example_messages['credit_number']}" />
+ <h:inputText id="creditCardNumber" value="#{validateCreditCard.creditCardNumber}" required="true">
+ <mcv:validateCreditCard
+ amex="#{mcc:findComponent('myform:creditCardType').value == 'AMEX'}"
+ visa="#{mcc:findComponent('myform:creditCardType').value == 'VISA'}"
+ discover="#{mcc:findComponent('myform:creditCardType').value == 'DISCOVER'}"
+ mastercard="#{mcc:findComponent('myform:creditCardType').value == 'MASTERCARD'}" />
+ </h:inputText>
+ <h:message id="creditCardNumberError" for="creditCardNumber" styleClass="error" />
+ </h:panelGrid>
+ <h:panelGroup/>
+ <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateCreditCard.submit}"/>
+ <h:panelGroup/>
+ </h:form>
+ </ui:define>
+
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css Fri Nov 26 18:35:04 2010
@@ -0,0 +1,658 @@
+body {
+ background-color: rgb(0, 35, 75);
+ font-family : arial, verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size : 12px;
+}
+
+#container {
+ margin: 10px auto;
+ width: 900px;
+ background-color: white;
+ padding: 3px;
+}
+
+h1 {
+ font-size: 20px;
+}
+
+.standard {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+}
+
+.standard_bold {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ font-weight: bold;
+}
+
+.scrollerTable {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ padding: 2;
+ border-style: solid;
+ border-width: 1px;
+ width: 400px;
+}
+
+.scroller {
+ padding-left:20px;
+}
+
+.paginator {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+}
+
+
+.standardTable {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ padding: 2;
+ border-style: solid;
+ border-width: 1px;
+}
+
+.standardTable_Header {
+ color: #000000;
+ background-color: #FFDD00;
+ padding: 3;
+ text-align: center;
+ border: none;
+}
+
+.standardTable_SortHeader {
+ background-color: #FFDD00;
+ color: #000000;
+ padding: 3;
+ text-align: center;
+ border: none;
+ font-weight: bold;
+}
+
+.standardTable_Footer {
+ background-color: #FFFFE0;
+}
+
+.standardTable_Row1 {
+ background-color: #FFFFE0;
+}
+
+.standardTable_Row2 {
+ background-color: #FFFFE0;
+}
+
+.standardTable_Column {
+}
+
+.standardTable_ColumnCentered {
+ text-align: center
+}
+
+a
+{
+ color: #333366;
+ text-decoration: underline;
+ font-size: 12px;
+}
+
+a:hover
+{
+ color: #333366;
+ text-decoration: underline;
+}
+
+.error {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ color: #FF0000;
+}
+
+.sortLink {
+ color: #333366;
+ text-decoration: none;
+}
+
+
+.pageLayout {
+ width:760px;
+ height:100%;
+}
+
+.pageHeader {
+ background-color: #6392C6;
+ text-align: center;
+ vertical-align: middle;
+ height:1px;
+ overflow:visible;
+ color: #FFFFFF;
+ padding: 0px;
+ margin: 0px;
+}
+
+.pageHeader1 {
+}
+.pageHeader2 {
+ width:100%;
+}
+.pageHeader2col1 {
+ background-color: #FFFFFF;
+}
+
+.pageNavigation {
+ text-align: left;
+ vertical-align: top;
+ width: 200px;
+ background-color: #E7EFF7;
+ border: 1px solid #6392C6;
+ padding: 10px;
+}
+
+.pageBody {
+ text-align: left;
+ vertical-align: top;
+ width: 560px;
+ padding: 20px;
+ background-color: #FFFFFF;
+}
+
+.pageFooter {
+ text-align: right;
+ font-size: xx-small;
+ height:1px;
+ overflow:visible;
+ background-color: #6392C6;
+ color: #FFFFFF;
+}
+
+
+
+.navigation {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ width: 100%;
+}
+
+.navitem {
+ white-space : nowrap;
+ text-decoration : none;
+}
+
+a.navitem:hover,active {
+ white-space : nowrap;
+ text-decoration: none;
+ color: #6392C6;
+}
+
+.navitem_open {
+ white-space : nowrap;
+ text-decoration: none;
+ font-weight : bold;
+}
+
+a.navitem_open:hover,active {
+ white-space : nowrap;
+ text-decoration: none;
+ font-weight : bold;
+ color: #6392C6;
+}
+
+.navitem_active {
+ white-space : nowrap;
+ text-decoration: none;
+ font-weight : bold;
+ background-color: #6392C6;
+ width: 100%;
+ color: #FFFFFF;
+}
+
+a.navitem_active:hover,active {
+ white-space : nowrap;
+ text-decoration: none;
+ font-weight : bold;
+ background-color: #6392C6;
+ width: 100%;
+ color: #FFFFFF;
+}
+
+
+.navseparator {
+ line-height: 12px;
+ border-bottom: 1px solid #A2B7C5;
+}
+
+
+
+.fileUploadInput {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ width: 250px;
+}
+
+
+
+
+.emptyHeader {
+ background-color: #FFFFFF;
+ border-top: 0px none;
+ border-right: 0px none;
+ border-bottom: 0px none;
+ border-left: 0px none;
+}
+
+
+
+div.titlebar {
+ background: #C7D0D9;
+ color: black;
+ border: 1px solid #8CACBB;
+ padding-left: 1px;
+ padding-right: 1px;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ margin: 1px 1px;
+ clear: both;
+}
+
+/*
+ ------------------------------------------------------------
+ Calendar component
+ ------------------------------------------------------------
+*/
+
+.yearMonthHeader {
+ background-color: #DDDDDD;
+ color: #000000;
+ text-align: center;
+ border: none;
+ font-weight: bold;
+}
+
+.weekHeader {
+ background-color: #E7E7E7;
+ color: #000000;
+ text-align: center;
+ border: none;
+}
+
+.currentDayCell {
+ background-color: #DDDDDD;
+ color: #000000;
+ border: none;
+}
+
+
+/*
+ ------------------------------------------------------------
+ End Calendar component
+ ------------------------------------------------------------
+*/
+
+/*
+ ------------------------------------------------------------
+ Popup component
+ ------------------------------------------------------------
+*/
+
+.popup {
+ background-color:rgb(255,255,255);
+ color: #000000;
+ border: 1px solid #CCCCCC;
+ font-size:smaller;
+ padding: 5px;
+}
+
+.popup table {
+ font-size:smaller;
+}
+
+
+/*
+ ------------------------------------------------------------
+ End popup component
+ ------------------------------------------------------------
+*/
+
+
+.countryFormTable {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ padding: 2;
+ border-style: solid;
+ border-width: 1px;
+}
+
+.countryFormHeader {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ padding: 2;
+ border-style: none;
+ background-color: #FFDD00;
+ text-align: center;
+ font-weight : normal;
+}
+
+.countryFormFooter {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ padding: 2;
+ border-style: none;
+ background-color: #FFDD00;
+ text-align: center;
+ font-weight : normal;
+}
+
+.countryFormLabels {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ padding: 2;
+ border-style: none;
+ text-align: right;
+ font-weight : bold;
+}
+
+.countryFormInputs {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ padding: 2;
+ border-style: none;
+}
+
+/*
+ ------------------------------------------------------------
+ Tree component
+ ------------------------------------------------------------
+*/
+
+.nodeFolder
+{
+ font-size: 10px;
+ font-family: Verdana, Geneva, sans-serif;
+ text-decoration: none
+}
+.document
+{
+ color: blue;
+ font-size: 10px;
+ font-family: Verdana, Geneva, sans-serif;
+ text-decoration: none
+}
+.documentSelected
+{
+ color: blue;
+ font-size: 10px;
+ font-family: Verdana, Geneva, sans-serif;
+ text-decoration: none;
+ font-weight: bold
+}
+
+.childCount
+{
+ color: blue;
+ font-size: 10px;
+ font-family: Verdana, Geneva, sans-serif;
+ text-decoration: none
+}
+
+/*
+ ------------------------------------------------------------
+ Panelnavigation
+ ------------------------------------------------------------
+*/
+#subnavigation {
+margin-left: 0px;
+margin-right: 20px;
+padding: 0px 0px 20px 0px;
+border: 1px solid #546359;
+background-color: #EAF4F4;
+}
+
+#subnavigation_outer {
+float: left;
+width: 220px;
+padding: 0px;
+margin: 0px 0px 0px 0px;
+}
+#subnavigation_outer h1 {
+font-size: 1.5em;
+margin: 0px;
+padding: 0px 0px 15px 0px;
+}
+
+/*
+ --------------------------------------------------------------
+ Horizontal Panelnavigation
+ --------------------------------------------------------------
+*/
+#hNav_outer {
+ margin: 0;
+ padding: 0;
+ height: 60px;
+ width: 800px;
+}
+#hNav_outer ul {
+ padding: 0;
+ margin: 0;
+}
+#hNav_outer ul li ul {
+ margin: 0;
+ padding: 0;
+}
+#hNav_outer ul a {
+ text-decoration: none;
+}
+#hNav_outer ul li { /*float the main list items*/
+ margin: 0;
+ float: left;
+ display: block;
+ padding: 5px;
+}
+#hNav_outer ul li ul {
+ display: none;
+}
+#hNav_outer ul li.off ul, #hNav_outer ul li.on ul { /*put the subnav below*/
+ position: absolute;
+ top: 36px;
+ *top: 44px;/*reposition for IE*/
+ background: #224d6f;
+ left: 13px;
+ *left: 15px;
+ width: 740px;
+}
+#hNav_outer ul li.on ul {
+ display: block;
+ background: #f90;
+}
+#hNav_outer ul li.on:hover ul, #hNav_outer ul li.over ul { /*for ie*/
+ background: #224d6f;
+}
+#hNav_outer ul li a {
+ color: #224d6f;
+ font-weight: bold;
+ display: block;
+ padding: 5;
+}
+#hNav_outer ul li.on a {
+ color: #fff;
+ background: #f90;
+}
+#hNav_outer ul li.on ul a, #hNav_outer ul li.off ul a {
+ float: left; /*ie doesn't inherit the float*/
+ border: 0;
+ color: #f90;
+ width: auto;
+}
+#hNav_outer ul li.on:hover ul a, #hNav_outer ul li.over ul li a { /*for ie - the specificity is necessary*/
+ background: #224d6f;
+}
+#hNav_outer ul li.off:hover ul, #hNav_outer ul li.over ul {
+ display: block;
+ z-index: 6000;
+}
+#hNav_outer ul li.off a:hover, #hNav_outer ul li:hover a, #hNav_outer ul li.over a {
+ background: #29497b;
+ color: #f90;
+}
+#hNav_outer ul li.off a:hover, #hNav_outer ul li.on a:hover {
+ color: #f90;
+}
+/*subnav formatting*/
+#hNav_outer ul li.off ul a {
+ display: block;
+ background: #224d6f;
+ color: #fff;
+}
+#hNav_outer ul li.on ul a {
+ display: block;
+ background: #f90;
+ color: #fff;
+}
+
+/**************************************************
+ * css layers and classes for list navigation list
+ **************************************************/
+#subnavigation ul li a {
+display:block;
+background-color: #D1E4E4;
+color: #294747;
+text-decoration: none;
+border-bottom: 1px solid #87A8A8;
+padding: 2px 20px;
+margin: 0px;
+}
+
+#subnavigation ul li a:visited {color:#294747;}
+#subnavigation ul li a:hover {color: #FFFFFF; background-color: #87A8A8;}
+#subnavigation ul li a:active { color:#294747;}
+
+#subnavigation ul li a.selected {
+font-weight: bold;
+color:#294747;
+background-color: #FFFFFF;
+}
+
+#subnavigation ul ul li a {
+padding: 2px 20px 2px 25px;
+margin: 0px;
+background-color: #FFFFFF;}
+
+#subnavigation ul ul li ul li a {
+padding: 2px 20px 2px 30px;
+margin: 0px;
+}
+
+#subnavigation ul {
+list-style-type: none;
+padding: 0px;
+margin: 0px;
+}
+
+#subnavigation li{
+margin: 0px;
+padding: 0px;
+display:inline;
+}
+
+#subnavigation ul.mypage li a {
+padding: 2px 20px 2px 20px;
+margin: 0px;
+background-color: #EAF4F4;
+}
+
+#subnavigation ul.mypage ul li a:hover {color: #FFFFFF; background-color: #87A8A8;}
+/*
+ body, th, td, input, select {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ }
+
+ table, th, td {
+ font-size: small;
+ border: none;
+ }
+
+ .treeHeader {
+ background-color: #bbb;
+ border: 0.75px solid #fff;
+ padding: 2px 3px;
+ text-align: left;
+ }
+
+ .treeFooter {
+ padding: 5px;
+ margin: .67em 2px;
+ margin-top: 0;
+ background-color: #ddd;
+ background-image: url(../images/sw_med_rond.gif);
+ background-repeat: no-repeat;
+ background-position: bottom left;
+ }
+
+ input, .treeFooter {
+ font-size: xx-small;
+ font-size: x-small;
+ }
+
+ .a td {
+ background: #ddd;
+ border-bottom: 1px solid #fff;
+ }
+
+ .b td {
+ background: #efefef;
+ border-bottom: 1px solid #fff;
+ }
+
+ .col1 {
+ border-right: 1px solid #fff;
+ padding: 2px 15px 2px 5px;
+ }
+
+ .col2 {
+ border-left: 1px solid #fff;
+ padding: 2px 15px 2px 5px;
+ }
+
+ .tree {
+ lineheight: 18px;
+ font-family: arial, sans-serif;
+ }
+
+ .treenode {
+ padding: 2px 15px 2px 5px;
+ }
+
+ .treenode a {
+ text-decoration: none;
+ }
+
+ .treenodeSelected {
+ padding: 2px 15px 2px 5px;
+ }
+
+ .treenodeSelected a {
+ text-decoration: none;
+ font-weight: bold;
+ }
+
+ table .selectOneRadio {
+ font-weight: bold;
+ }
+
+
+ .standardList {
+ font-family : verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #000000;
+ }
+
+ */
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,89 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+
+ <ui:define name="body">
+
+ <h:form id="myform">
+ <p>This component allows to export the datatable contents to an excel or pdf file.</p>
+
+ <br/>
+
+ <h:dataTable id="tbl_cars"
+ styleClass="scrollerTable"
+ headerClass="standardTable_Header"
+ footerClass="standardTable_Header"
+ rowClasses="standardTable_Row1,standardTable_Row2"
+ columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
+ var="car"
+ value="#{exporterBean.carsList}">
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Id" />
+ </f:facet>
+ <h:outputText value="#{car.id}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Type" />
+ </f:facet>
+ <h:outputText value="#{car.type}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Color" />
+ </f:facet>
+ <h:outputText value="#{car.color}" />
+ </h:column>
+
+ </h:dataTable>
+
+ <br/>
+
+ <h:commandButton id="btn1" action="#{exporterBean.export}" value="Export as excel">
+ <mc:exporterActionListener for="tbl_cars" fileType="XLS" filename="myFile"/>
+ </h:commandButton>
+
+ <br/>
+
+ <h:commandButton id="btn2" action="#{exporterBean.export}" value="Export as pdf">
+ <mc:exporterActionListener for="tbl_cars" fileType="PDF" filename="myFile"/>
+ </h:commandButton>
+
+
+ </h:form>
+ </ui:define>
+
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <head>
+ <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" />
+ <title>MyFaces - the free JSF Implementation - Myfaces Commons Facelets Example</title>
+ <link rel="stylesheet" type="text/css" href="./css/basic.css" />
+ </head>
+ <body>
+ <div id="container">
+ <h:form>
+
+ <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>
+
+ <h:panelGrid id="header_group1" columns="2" styleClass="pageHeader" >
+ <h:panelGroup>
+ <h:outputText style="font-size:20px;color:#FFFFFF" escape="false" value="MyFaces - The free JavaServer™ Faces Implementation - Myfaces Commons Facelets Example"/>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ <h:panelGrid>
+ <h:outputLink value="convertBoolean.jsf" ><f:verbatim>mcc:convertBoolean</f:verbatim></h:outputLink>
+ <h:outputLink value="convertEnum.jsf" ><f:verbatim>mcc:convertEnum</f:verbatim></h:outputLink>
+ <h:outputLink value="convertNumber.jsf" ><f:verbatim>mcc:convertNumber</f:verbatim></h:outputLink>
+ <h:outputLink value="convertDateTime.jsf" ><f:verbatim>mcc:convertDateTime</f:verbatim></h:outputLink>
+ <h:outputLink value="creditcardvalidator.jsf" ><f:verbatim>mcv:validateCreditCard</f:verbatim></h:outputLink>
+ <h:outputLink value="validate.jsf" ><f:verbatim>Multiple Validations (Email, Credit Card, Regex)</f:verbatim></h:outputLink>
+ <h:outputLink value="validateCompareTo.jsf" ><f:verbatim>mcv:validateCompareTo</f:verbatim></h:outputLink>
+ <h:outputLink value="validateCSV.jsf" ><f:verbatim>mcv:validateCSV</f:verbatim></h:outputLink>
+ <h:outputLink value="validateUrl.jsf" ><f:verbatim>mcv:validateUrl</f:verbatim></h:outputLink>
+ <h:outputLink value="exporter.jsf" ><f:verbatim>Exporter - Export datatable contents as an excel file or as a pdf file</f:verbatim></h:outputLink>
+ <h:outputLink value="renderOne.jsf" ><f:verbatim>mc:renderOne - render the first child component by order or by index</f:verbatim></h:outputLink>
+ <h:outputLink value="outputClientId.jsf" ><f:verbatim>mc:outputClientId</f:verbatim></h:outputLink>
+ </h:panelGrid>
+
+ </h:form>
+ </div>
+ </body>
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html Fri Nov 26 18:35:04 2010
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="refresh" content="0; URL=home.jsf"/>
+</head>
+
+<body>
+</body>
+</html>
\ No newline at end of file
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:mc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<ui:composition template="/META-INF/templates/template.xhtml">
+
+ <ui:define name="body">
+
+ <h:messages showDetail="true" showSummary="false"/>
+
+ <p>
+ <a href="javascript:void" onclick="testJavascript(event);return false;">Test link</a>
+
+ <script type="text/javascript">
+ function testJavascript(event) {
+ var element = document.getElementById('<mc:outputClientId for="myContainer" />');
+ }
+ </script>
+ </p>
+
+ <h:form id="myContainer">
+ mc:outputClientId is useful when a component id is needed as reference within an inline javascript.
+ <ul>
+ <li>ClientId of containing container is <code><mc:outputClientId for="myContainer"/></code></li>
+ <li>ClientId of current parent is <code><mc:outputClientId /></code></li>
+ </ul>
+ </h:form>
+ <p> <c:set var="hash" value="#"/>
+ And here is the id using the EL function <code>#{hash}{mc:outputClientId(id)}</code>: <code>#{mc:outputClientId('myContainer')}</code>.
+ </p>
+ </ui:define>
+
+</ui:composition>
+
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mcc="http://myfaces.apache.org/commons/converters"
+ xmlns:mc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:form>
+
+ <h:outputText value="Output:" />
+ <h:panelGrid columns="2">
+ <h:outputText value="'first' will display the first rendered child component only (will render only B):" />
+ <mc:renderOne>
+ <h:outputText value="A - FirstItem" rendered="#{renderOne.ARendered}"/>
+ <h:outputText value="B - SecondItem" rendered="#{renderOne.BRendered}"/>
+ <h:outputText value="C - ThirdItem" rendered="#{renderOne.CRendered}"/>
+ <h:outputText value="D - FourthItem" rendered="#{renderOne.DRendered}"/>
+ </mc:renderOne>
+
+ <h:outputText value="'index' will display the third component only (will render only C):" />
+ <mc:renderOne type="index" value="#{renderOne.index}">
+ <h:outputText value="A - FirstItem" rendered="#{renderOne.ARendered}"/>
+ <h:outputText value="B - SecondItem" rendered="#{renderOne.BRendered}"/>
+ <h:outputText value="C - ThirdItem" rendered="#{renderOne.CRendered}"/>
+ <h:outputText value="D - FourthItem" rendered="#{renderOne.DRendered}"/>
+ </mc:renderOne>
+
+ </h:panelGrid>
+
+ </h:form>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mc="http://myfaces.apache.org/commons/converters"
+ xmlns:mcc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:panelGroup id="body">
+
+ <h:messages showDetail="true" showSummary="false"/>
+
+ <h:form id="form1">
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="email" value="#{example_messages['validate_email']}"/>
+ <h:inputText id="email" value="#{validateForm.email}" required="true">
+ <f:validator validatorId="org.apache.myfaces.commons.validator.Email"/>
+ </h:inputText>
+ <h:message id="emailError" for="email" styleClass="error"/>
+
+ <h:outputLabel for="email2" value="#{example_messages['validate_email']}2"/>
+ <h:inputText id="email2" value="#{validateForm.email2}" required="true">
+ <mcv:validateEmail detailMessage="Not a valid email address."/>
+ </h:inputText>
+ <h:message id="emailError2" for="email2" styleClass="error"/>
+
+ <h:outputLabel for="creditCardNumber" value="#{example_messages['validate_credit']}"/>
+ <h:inputText id="creditCardNumber" value="#{validateForm.creditCardNumber}" required="true">
+ <mcv:validateCreditCard detailMessage='#{"{0} is not a valid credit card number."}'/>
+ </h:inputText>
+ <h:message id="creditCardNumberError" for="creditCardNumber" styleClass="error"/>
+
+ <h:outputLabel for="regExprValue" value="#{example_messages['validate_regexp']}"/>
+ <h:inputText id="regExprValue" value="#{validateForm.regExpr}" required="true">
+ <mcv:validateRegExpr pattern="[bcr]at" detailMessage='#{"{0} is not valid in this field." }'/>
+ </h:inputText>
+ <h:message id="regExprValueError" for="regExprValue" styleClass="error"/>
+
+ <h:panelGroup/>
+ <h:commandButton id="validateButton" value="#{example_messages['button_submit']}"
+ action="#{validateForm.submit}"/>
+ <h:panelGroup/>
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mc="http://myfaces.apache.org/commons/converters"
+ xmlns:mcc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:panelGroup id="body">
+
+ <h:messages showDetail="true" showSummary="false"/>
+
+ <h:form id="form1">
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="email" value="#{example_messages['email_comma']}" />
+ <h:inputText id="email" value="#{validateForm.email}" required="true">
+ <mcv:validateCSV subvalidatorId="org.apache.myfaces.commons.validator.Email" />
+ </h:inputText>
+ <h:message id="emailError" for="email" styleClass="error" />
+
+ <h:outputLabel for="creditCardNumber" value="#{example_messages['credit_dot']}" />
+ <h:inputText id="creditCardNumber" value="#{validateForm.creditCardNumber}" required="true">
+ <mcv:validateCSV subvalidatorId="org.apache.myfaces.commons.validator.CreditCard" separator="\\." />
+ </h:inputText>
+ <h:message id="creditCardNumberError" for="creditCardNumber" styleClass="error" />
+
+ <h:panelGroup/>
+ <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateForm.submit}"/>
+ <h:panelGroup/>
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,93 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mc="http://myfaces.apache.org/commons/converters"
+ xmlns:mcc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:panelGroup id="body">
+
+ <h:form id="form1">
+ <h:messages showDetail="true" showSummary="false"/>
+
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="baseInput" value="#{example_messages['validate_base']}" />
+ <h:inputText id="baseInput" value="#{validateForm.equal}" required="true"/>
+ <h:message id="baseError" for="baseInput" styleClass="error" />
+
+ <h:outputLabel for="eqInput" value="#{example_messages['validate_equal']}" />
+ <h:inputText id="eqInput" required="true">
+ <mcv:validateCompareTo for="baseInput" operator="eq" />
+ </h:inputText>
+ <h:message id="eqError" for="eqInput" styleClass="error" />
+
+ <h:outputLabel for="neInput" value="#{example_messages['validate_notequal']}" />
+ <h:inputText id="neInput" required="true">
+ <mcv:validateCompareTo for="baseInput" operator="ne" />
+ </h:inputText>
+ <h:message id="neError" for="neInput" styleClass="error" />
+
+ <h:outputLabel for="gtInput" value="#{example_messages['validate_greaterthan']}" />
+ <h:inputText id="gtInput" required="true">
+ <mcv:validateCompareTo for="baseInput" operator="gt" />
+ </h:inputText>
+ <h:message id="gtError" for="gtInput" styleClass="error" />
+
+ <h:outputLabel for="geInput" value="#{example_messages['validate_greaterthanequal']}" />
+ <h:inputText id="geInput" required="true">
+ <mcv:validateCompareTo for="baseInput" operator="ge" />
+ </h:inputText>
+ <h:message id="geError" for="geInput" styleClass="error" />
+
+ <h:outputLabel for="ltInput" value="#{example_messages['validate_lessthan']}" />
+ <h:inputText id="ltInput" required="true">
+ <mcv:validateCompareTo for="baseInput" operator="lt" />
+ </h:inputText>
+ <h:message id="ltError" for="ltInput" styleClass="error" />
+
+ <h:outputLabel for="leInput" value="#{example_messages['validate_lessthanequal']}" />
+ <h:inputText id="leInput" required="true">
+ <mcv:validateCompareTo for="baseInput" operator="le" />
+ </h:inputText>
+ <h:message id="leError" for="leInput" styleClass="error" />
+
+ <h:panelGroup/>
+ <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateForm.submit}"/>
+ <h:panelGroup/>
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml (added)
+++ myfaces/commons/branches/jsf_11/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mc="http://myfaces.apache.org/commons/converters"
+ xmlns:mcc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:panelGroup id="body">
+
+ <h:form id="form1">
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="url" value="#{example_messages['validate_url']}" />
+ <h:inputText id="url" value="#{validateForm.url}" required="true">
+ <mcv:validateUrl schemes="http,https" allow2Slashes="true"/>
+ </h:inputText>
+ <h:message id="urlError" for="url" styleClass="error" />
+
+ <h:panelGroup/>
+ <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateForm.submit}"/>
+ <h:panelGroup/>
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_11/examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/examples/pom.xml?rev=1039499&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/examples/pom.xml (added)
+++ myfaces/commons/branches/jsf_11/examples/pom.xml Fri Nov 26 18:35:04 2010
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.myfaces</groupId>
+ <artifactId>myfaces</artifactId>
+ <version>9</version>
+ </parent>
+
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>commons-examples11</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Apache MyFaces Commons Examples</name>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/commons/jsf_11/examples</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/commons/jsf_11/examples</developerConnection>
+ <url>http://svn.apache.org/viewcvs.cgi/myfaces/commons/jsf_11/examples</url>
+ </scm>
+
+ <modules>
+ <module>myfaces-commons-examples</module>
+ <module>myfaces-commons-facelets-examples</module>
+ </modules>
+
+</project>