You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ca...@apache.org on 2007/02/06 14:22:39 UTC

svn commit: r504132 - in /myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp: clientValidationWithForm.jsp home.jsp

Author: cagatay
Date: Tue Feb  6 05:22:38 2007
New Revision: 504132

URL: http://svn.apache.org/viewvc?view=rev&rev=504132
Log:
Add another client side validation&conversion example without the validationscript component but instead sandbox form

Added:
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/clientValidationWithForm.jsp
Modified:
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp

Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/clientValidationWithForm.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/clientValidationWithForm.jsp?view=auto&rev=504132
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/clientValidationWithForm.jsp (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/clientValidationWithForm.jsp Tue Feb  6 05:22:38 2007
@@ -0,0 +1,69 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
+<html>
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<%@include file="inc/head.inc" %>
+
+<body>
+
+<f:view>
+
+  <s:form id="carForm">
+
+		<t:messages forceSpan="true" layout="list" />
+
+		<h:panelGrid columns="3">
+			<h:outputText id="lbl_name" value="Name *"></h:outputText>
+			<h:inputText id="txt_name" value="#{customerCreateBean.customer.name}" required="true"></h:inputText>
+			<t:message for="txt_name" forceSpan="true" />
+			
+			<h:outputText id="lbl_surname" value="Surname *"></h:outputText>
+			<h:inputText id="txt_surname" value="#{customerCreateBean.customer.surname}" required="true"></h:inputText>
+			<t:message for="txt_surname" forceSpan="true" />
+
+			<h:outputText id="lbl_age" value="Age"></h:outputText>
+			<h:inputText id="txt_age" value="#{customerCreateBean.customer.age}"></h:inputText>
+			<t:message for="txt_age" forceSpan="true" />
+			
+			<h:outputText id="lbl_address" value="Adress"></h:outputText>
+			<h:inputText id="txt_address" value="#{customerCreateBean.customer.address}">
+				<f:validateLength minimum="2" maximum="5"/>
+			</h:inputText>
+			<t:message for="txt_address" forceSpan="true" />
+		</h:panelGrid>
+
+		<h:commandButton id="btn_save" value="Create" action=""/>
+
+	</s:form>
+	
+</f:view>
+
+<%@include file="inc/page_footer.jsp" %>
+
+</body>
+
+</html>

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp?view=diff&rev=504132&r1=504131&r2=504132
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp Tue Feb  6 05:22:38 2007
@@ -28,7 +28,8 @@
                 <f:verbatim><a href="#filterTable">Filter Table</a></f:verbatim>
                 <h:outputText value="Client Side Validation"/>
 	            <h:panelGrid style="padding-left:25px">
-	            	<h:outputLink value="clientValidation.jsf"><f:verbatim>Conversion&Validation at Client Side</f:verbatim></h:outputLink>
+	            	<h:outputLink value="clientValidation.jsf"><f:verbatim>Conversion&Validation with ValidationScript Component</f:verbatim></h:outputLink>
+ 		            <h:outputLink value="clientValidationWithForm.jsf"><f:verbatim>Conversion&Validation with Extended Form</f:verbatim></h:outputLink>
 	            </h:panelGrid>
             </h:panelGrid>