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/03/13 15:20:45 UTC

svn commit: r517704 - in /myfaces/current12/test-webapp/src/main: java/org/apache/myfaces/blank/LabelTest.java webapp/WEB-INF/examples-config.xml webapp/labelTest.jsp

Author: cagatay
Date: Tue Mar 13 07:20:43 2007
New Revision: 517704

URL: http://svn.apache.org/viewvc?view=rev&rev=517704
Log:
Add example for the new label attribute

Added:
    myfaces/current12/test-webapp/src/main/java/org/apache/myfaces/blank/LabelTest.java   (with props)
    myfaces/current12/test-webapp/src/main/webapp/labelTest.jsp
Modified:
    myfaces/current12/test-webapp/src/main/webapp/WEB-INF/examples-config.xml

Added: myfaces/current12/test-webapp/src/main/java/org/apache/myfaces/blank/LabelTest.java
URL: http://svn.apache.org/viewvc/myfaces/current12/test-webapp/src/main/java/org/apache/myfaces/blank/LabelTest.java?view=auto&rev=517704
==============================================================================
--- myfaces/current12/test-webapp/src/main/java/org/apache/myfaces/blank/LabelTest.java (added)
+++ myfaces/current12/test-webapp/src/main/java/org/apache/myfaces/blank/LabelTest.java Tue Mar 13 07:20:43 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.blank;
+
+/**
+ * 
+ * Backing bean for the label test example page
+ */
+public class LabelTest {
+
+	private String _text;
+
+	public String getText() {
+		return _text;
+	}
+	public void setText(String _text) {
+		this._text = _text;
+	}
+}

Propchange: myfaces/current12/test-webapp/src/main/java/org/apache/myfaces/blank/LabelTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/current12/test-webapp/src/main/webapp/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewvc/myfaces/current12/test-webapp/src/main/webapp/WEB-INF/examples-config.xml?view=diff&rev=517704&r1=517703&r2=517704
==============================================================================
--- myfaces/current12/test-webapp/src/main/webapp/WEB-INF/examples-config.xml (original)
+++ myfaces/current12/test-webapp/src/main/webapp/WEB-INF/examples-config.xml Tue Mar 13 07:20:43 2007
@@ -13,6 +13,12 @@
 		<managed-bean-scope>request</managed-bean-scope>
 	</managed-bean>
 	
+	<managed-bean>
+		<managed-bean-name>labelTest</managed-bean-name>
+		<managed-bean-class>org.apache.myfaces.blank.LabelTest</managed-bean-class>
+		<managed-bean-scope>request</managed-bean-scope>
+	</managed-bean>
+	
 	<!-- navigation rules for helloWorld.jsp -->
 	<navigation-rule>
 		<from-view-id>/helloWorld.jsp</from-view-id>

Added: myfaces/current12/test-webapp/src/main/webapp/labelTest.jsp
URL: http://svn.apache.org/viewvc/myfaces/current12/test-webapp/src/main/webapp/labelTest.jsp?view=auto&rev=517704
==============================================================================
--- myfaces/current12/test-webapp/src/main/webapp/labelTest.jsp (added)
+++ myfaces/current12/test-webapp/src/main/webapp/labelTest.jsp Tue Mar 13 07:20:43 2007
@@ -0,0 +1,20 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+<head>
+	<title>Label Test</title>
+</head>
+
+<body>
+<f:view>
+	<h:form id="labelTestForm">
+		<h:messages />
+		<br>
+		<h:inputText id="txt_text" value="#{labelTest.text}" label="Text" required="true"></h:inputText>
+		<h:message for="txt_text"></h:message>
+		<br>
+		<h:commandButton value="Test" />
+	</h:form>
+</f:view>
+</body>
+</html>