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 21:02:34 UTC
svn commit: r1039540 [2/2] - in /myfaces/commons/branches/jsf_20/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/examples/...
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/accessedbeans/AccessedBeans.java Fri Nov 26 20:02:33 2010
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.commons.examples.accessedbeans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Martin Marinschek (latest modification by $Author: matzew $)
+ * @version $Revision: 167718 $ $Date: 2005-03-24 17:47:11 +0100 (Do, 24 Mär 2005) $
+ */
+public class AccessedBeans
+{
+ private List beanList;
+
+ public List getBeanList()
+ {
+ if(beanList == null)
+ beanList = new ArrayList();
+
+ return beanList;
+ }
+
+ public void setBeanList(List beanList)
+ {
+ this.beanList = beanList;
+ }
+
+ public void addBean(String name, Object resolvedBean)
+ {
+ List li = getBeanList();
+
+ for (int i = 0; i < li.size(); i++)
+ {
+ AccessedBean accessedBean = (AccessedBean) li.get(i);
+ if(accessedBean.getName().equals(name))
+ return;
+ }
+
+ AccessedBean bean = new AccessedBean();
+ bean.setName(name);
+ bean.setClazz(resolvedBean.getClass().getName());
+
+ li.add(bean);
+ }
+
+ public static class AccessedBean
+ {
+ private String name;
+ private String clazz;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getClazz()
+ {
+ return clazz;
+ }
+
+ public void setClazz(String clazz)
+ {
+ this.clazz = clazz;
+ }
+ }
+}
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/EducationLevel.java Fri Nov 26 20:02:33 2010
@@ -26,4 +26,4 @@ public enum EducationLevel
UNIVERSITY,
MASTER,
DOCTOR
-}
+}
\ No newline at end of file
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateCreditCard.java Fri Nov 26 20:02:33 2010
@@ -21,6 +21,9 @@ package org.apache.myfaces.commons.examp
import java.util.ArrayList;
import java.util.List;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UISelectOne;
+import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
/**
@@ -35,6 +38,8 @@ public class ValidateCreditCard {
private List<SelectItem> types = null;
+ private UISelectOne creditCardTypeSelect;
+
public List<SelectItem> getCreditCardTypes()
{
if (types == null)
@@ -50,6 +55,7 @@ public class ValidateCreditCard {
public String submit(){
System.out.println("Action was called.");
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("The selected credit card type/number is valid"));
return ("valid");
}
@@ -90,4 +96,24 @@ public class ValidateCreditCard {
{
return "DISCOVER".equalsIgnoreCase(creditCardType);
}
+
+ public UISelectOne getCreditCardTypeSelect()
+ {
+ return creditCardTypeSelect;
+ }
+
+ public void setCreditCardTypeSelect(UISelectOne creditCardTypeSelect)
+ {
+ this.creditCardTypeSelect = creditCardTypeSelect;
+ }
+
+ public String getCreditCardTypeFromSelect()
+ {
+ Object value = creditCardTypeSelect.getValue();
+ if (value != null)
+ {
+ return value.toString();
+ }
+ return null;
+ }
}
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/examples/validate/ValidateEnum.java Fri Nov 26 20:02:33 2010
@@ -18,6 +18,9 @@
*/
package org.apache.myfaces.commons.examples.validate;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
public class ValidateEnum
{
@@ -33,4 +36,9 @@ public class ValidateEnum
this.level = level;
}
+ public String submit(){
+ System.out.println("Action was called.");
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("The selected value is valid"));
+ return ("valid");
+ }
}
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/SourceCodeServlet.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/SourceCodeServlet.java?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/SourceCodeServlet.java (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/java/org/apache/myfaces/commons/servlet/SourceCodeServlet.java Fri Nov 26 20:02:33 2010
@@ -48,7 +48,7 @@ public class SourceCodeServlet extends H
webPage = webPage.substring(0, jsfChopPoint);
- webPage += ".jsp"; // replace jsf with jsp
+ webPage += ".xhtml"; // replace jsf with jsp
// get the actual file location of the requested resource
String realPath = getServletConfig().getServletContext().getRealPath(webPage);
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/resources/org/apache/myfaces/examples/resource/example_messages.properties Fri Nov 26 20:02:33 2010
@@ -1,6 +1,8 @@
button_submit = Submit
email_comma = Email separated by ,
credit_dot = Credit Card separated by .
+credit_number = Insert a credit card number
+credit_type = Please select one card type
url_comma = Url separated by ,
isbn_semicolon = ISBN separated by ;
validate_email = Email
@@ -15,4 +17,5 @@ validate_notequal = Validate Not Equal
validate_greaterthan = Validate Greater Than
validate_greaterthanequal = Validate Greater Than Equal
validate_lessthan = Validate Less Than
-validate_lessthanequal =Validate Less Than Equal
\ No newline at end of file
+validate_lessthanequal =Validate Less Than Equal
+title=Myfaces Commons Example
\ No newline at end of file
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/footer.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/footer.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/footer.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/footer.xhtml Fri Nov 26 20:02:33 2010
@@ -0,0 +1,18 @@
+<?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"
+ xmlns:t="http://myfaces.apache.org/tomahawk">
+<body>
+<ui:composition>
+ <br/>
+ <br/>
+ <a href="home.jsf">[HOME]</a>
+
+ <a href="#{request.requestURI}.source">[SOURCE]</a>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/mbean_source.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/mbean_source.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/mbean_source.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/mbean_source.xhtml Fri Nov 26 20:02:33 2010
@@ -0,0 +1,25 @@
+<?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"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions">
+<body>
+<ui:composition>
+ <br/>
+ <br/>
+ <h:dataTable value="#{accessedBeans.beanList}" var="accessedBean">
+ <h:column>
+ <h:outputLink value="#{accessedBean.clazz}.java.source" disabled="#{!fn:startsWith(accessedBean.clazz,'org.apache.myfaces.commons')}">
+ <h:outputText value="Usage of bean with name : "/>
+ <h:outputText value="#{accessedBean.name}"/>
+ <h:outputText value=" and class : "/>
+ <h:outputText value="#{accessedBean.clazz}"/>
+ </h:outputLink>
+ </h:column>
+ </h:dataTable>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/template.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/template.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/template.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/META-INF/templates/template.xhtml Fri Nov 26 20:02:33 2010
@@ -0,0 +1,30 @@
+<?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</title>
+ <link rel="stylesheet" type="text/css" href="./css/basic.css" />
+ <ui:insert name="head"/>
+</head>
+<body>
+ <f:loadBundle
+ basename="org.apache.myfaces.examples.resource.example_messages"
+ var="example_messages" />
+<div id="container">
+ <h1><h:outputText value="#{example_messages['title']}"/></h1>
+ <br/>
+ <ui:insert name="body"/>
+ <ui:insert name="mbean_source">
+ <ui:include src="/META-INF/templates/mbean_source.xhtml"/>
+ </ui:insert>
+ <ui:insert name="footer">
+ <ui:include src="/META-INF/templates/footer.xhtml"/>
+ </ui:insert>
+</div>
+</body>
+</html>
\ No newline at end of file
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/faces-config.xml?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/faces-config.xml Fri Nov 26 20:02:33 2010
@@ -7,7 +7,16 @@
<faces-config>
<!-- from project setup -->
+ <application>
+ <variable-resolver>org.apache.myfaces.commons.examples.accessedbeans.AccessTrackingVariableResolver</variable-resolver>
+ </application>
+ <!-- Accessed beans on the last request -->
+ <managed-bean>
+ <managed-bean-name>accessedBeans</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.commons.examples.accessedbeans.AccessedBeans</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
<managed-bean>
<managed-bean-name>dataFieldHolder</managed-bean-name>
<managed-bean-class>org.apache.myfaces.commons.examples.DataFieldHolder</managed-bean-class>
@@ -39,4 +48,23 @@
<managed-bean-class>org.apache.myfaces.commons.examples.validate.ValidateCreditCard</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>dateTimeBean</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.commons.examples.DateTimeBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>numberBean</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.commons.examples.NumberBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>booleanBean</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.commons.examples.BooleanBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
</faces-config>
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/web.xml?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/WEB-INF/web.xml Fri Nov 26 20:02:33 2010
@@ -23,7 +23,13 @@
version="2.4">
<description>MyProject web.xml</description>
-
+
+
+ <context-param>
+ <description>State saving method: "client" or "server" (= default) See JSF Specification 2.5.3</description>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
@@ -34,10 +40,6 @@
<param-value>true</param-value>
</context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>client</param-value>
- </context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
@@ -67,11 +69,6 @@
</description>
</context-param>
- <context-param>
- <param-name>facelets.LIBRARIES</param-name>
- <param-value>/WEB-INF/listeners/exporterActionListener.xml</param-value>
- </context-param>
-
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
@@ -85,6 +82,16 @@
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
+
+ <servlet>
+ <servlet-name>SourceCodeServlet</servlet-name>
+ <servlet-class>org.apache.myfaces.commons.servlet.SourceCodeServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SourceCodeServlet</servlet-name>
+ <url-pattern>*.source</url-pattern>
+ </servlet-mapping>
<!-- Welcome files -->
<welcome-file-list>
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertBoolean.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertBoolean.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertBoolean.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertBoolean.xhtml Fri Nov 26 20:02:33 2010
@@ -0,0 +1,64 @@
+<!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 check how mcc:convertBoolean works. This converter
+ translates between boolean values (true/false)
+ and alternate versions of those boolean values like
+ (yes/no), (1/0), and (way/no way).</p>
+ <h:form id="form1">
+ <h:messages showDetail="false" showSummary="true" ></h:messages>
+ <p>Current value: <h:outputText value="#{booleanBean.way}"/></p>
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="boolVal" value="" />
+ <h:inputText id="boolVal" value="#{booleanBean.way}" required="true">
+ <mcc:convertBoolean trueValue="way" falseValue="no way" />
+ </h:inputText>
+ <h:message for="boolVal" styleClass="error" />
+
+ <h:panelGroup />
+ <h:commandButton id="validateButton"
+ value="#{example_messages['button_submit']}"
+ action="#{booleanBean.submit}" />
+ <h:panelGroup />
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertDateTime.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertDateTime.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertDateTime.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertDateTime.xhtml Fri Nov 26 20:02:33 2010
@@ -0,0 +1,74 @@
+<!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:convertDateTime component works. It works almost
+ the same as f:convertDateTime, but it has as TimeZone default
+ TimeZone.getDefault() instead GMT 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="#{dateTimeBean.type}" >
+ <f:selectItem itemLabel="date" itemValue="date"/>
+ <f:selectItem itemLabel="time" itemValue="time"/>
+ <f:selectItem itemLabel="both" itemValue="both"/>
+ </h:selectOneMenu>
+ <h:message for="type" styleClass="error" />
+
+ <h:outputLabel for="date1"
+ value="Insert a date/time" />
+ <h:inputText id="date1" value="#{dateTimeBean.date1}" required="true">
+ <mcc:convertDateTime type="#{mc:findComponent('form1:type').value}"/>
+ </h:inputText>
+ <h:message for="date1" styleClass="error" />
+
+ <h:panelGroup />
+ <h:commandButton id="validateButton"
+ value="#{example_messages['button_submit']}"
+ action="#{dateTimeBean.submit}" />
+ <h:panelGroup />
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertEnum.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertEnum.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertEnum.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertEnum.xhtml Fri Nov 26 20:02:33 2010
@@ -0,0 +1,63 @@
+<!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 check if the input provided can be used to retrieve a
+ enumeration value using mcc:convertEnum.</p>
+ <h:form id="form1">
+ <h:messages showDetail="false" showSummary="true" ></h:messages>
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="enum"
+ value="#{example_messages['validate_enum']}" />
+ <h:inputText id="enum" value="#{validateEnum.level}" required="true">
+ <mcc:convertEnum
+ targetClass="org.apache.myfaces.commons.examples.validate.EducationLevel" />
+ </h:inputText>
+ <h:message id="enumError" for="enum" styleClass="error" />
+
+ <h:panelGroup />
+ <h:commandButton id="validateButton"
+ value="#{example_messages['button_submit']}"
+ action="#{validateEnum.submit}" />
+ <h:panelGroup />
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/convertNumber.xhtml Fri Nov 26 20:02:33 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>
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/creditcardvalidator.xhtml Fri Nov 26 20:02:33 2010
@@ -4,6 +4,7 @@
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">
<!--
@@ -27,29 +28,43 @@
*/
//-->
-<ui:composition template="/WEB-INF/layout/layout.xhtml">
-
- <ui:define name="content">
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
<h:messages showDetail="true" showSummary="false"/>
<h:form id="myform">
- <p>Please insert one of this cards</p>
-
- <h:selectOneRadio id="creditCardType" value="#{validateCreditCard.creditCardType}" immediate="true">
- <f:selectItems value="#{validateCreditCard.creditCardTypes}"/>
- </h:selectOneRadio>
+ <p>Some valid test numbers</p>
- <h:outputLabel for="creditCardNumber" value="#{example_messages['credit_dot']}" />
- <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" />
+ <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/>
@@ -57,6 +72,6 @@
</ui:define>
</ui:composition>
-
+</body>
</html>
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/css/basic.css Fri Nov 26 20:02:33 2010
@@ -1,8 +1,20 @@
body {
- font-family : arial, verdana, Geneva, Arial, Helvetica, sans-serif;
+ 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;
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/exporter.xhtml Fri Nov 26 20:02:33 2010
@@ -25,10 +25,10 @@
* under the License.
*/
//-->
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
-<ui:composition template="/WEB-INF/layout/layout.xhtml">
-
- <ui:define name="content">
+ <ui:define name="body">
<h:form id="myform">
<p>This component allows to export the datatable contents to an excel or pdf file.</p>
@@ -84,6 +84,6 @@
</ui:define>
</ui:composition>
-
+</body>
</html>
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/home.xhtml Fri Nov 26 20:02:33 2010
@@ -0,0 +1,45 @@
+<?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="validateDateRestriction.jsf" ><f:verbatim>mcv:validateDateRestriction</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>
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html?rev=1039540&r1=1039539&r2=1039540&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/index.html Fri Nov 26 20:02:33 2010
@@ -1,11 +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="Content-Type" content="text/html; charset=iso-8859-1" />
-<meta http-equiv="refresh" content="0; url=exporter.jsf" />
-<title>Index</title>
+ <meta http-equiv="refresh" content="0; URL=home.jsf"/>
</head>
<body>
</body>
-</html>
+</html>
\ No newline at end of file
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/outputClientId.xhtml Fri Nov 26 20:02:33 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_20/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/renderOne.xhtml Fri Nov 26 20:02:33 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_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validate.xhtml Fri Nov 26 20:02:33 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_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCSV.xhtml Fri Nov 26 20:02:33 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_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml Fri Nov 26 20:02:33 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_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml Fri Nov 26 20:02:33 2010
@@ -0,0 +1,64 @@
+<!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 mcv:validateDateRestriction validator works. It checks
+ if a date is outside a restriction indicated by invalidMonths, invalidDaysOfWeek or invalidDays</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="date1"
+ value="Insert a date (yyyy/MM/dd) [months jan, apr, sep are invalid and if fall on saturday or sunday(sat sun) ]" />
+ <h:inputText id="date1" value="#{dateTimeBean.date1}" required="true">
+ <mcc:convertDateTime pattern="yyyy/MM/dd"/>
+ <mcv:validateDateRestriction invalidMonths="#{dateTimeBean.invalidMonths}" invalidDaysOfWeek="sat sun"/>
+ </h:inputText>
+ <h:message for="date1" styleClass="error" />
+
+ <h:panelGroup />
+ <h:commandButton id="validateButton"
+ value="#{example_messages['button_submit']}"
+ action="#{dateTimeBean.submit}" />
+ <h:panelGroup />
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Added: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml?rev=1039540&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml (added)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml Fri Nov 26 20:02:33 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>