[richfaces-svn-commits] JBoss Rich Faces SVN: r14655 - in branches/community/3.3.X/samples/tabPanelDemo/src/main: webapp/WEB-INF and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jun 18 06:24:25 EDT 2009


Author: Alex.Kolonitsky
Date: 2009-06-18 06:24:25 -0400 (Thu, 18 Jun 2009)
New Revision: 14655

Added:
   branches/community/3.3.X/samples/tabPanelDemo/src/main/java/org/richfaces/PersonBean.java
   branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/pages/RF-7353.jsp
Modified:
   branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/WEB-INF/faces-config.xml
Log:
TabPanel: value evaluated at phase1
https://jira.jboss.org/jira/browse/RF-7353

Added: branches/community/3.3.X/samples/tabPanelDemo/src/main/java/org/richfaces/PersonBean.java
===================================================================
--- branches/community/3.3.X/samples/tabPanelDemo/src/main/java/org/richfaces/PersonBean.java	                        (rev 0)
+++ branches/community/3.3.X/samples/tabPanelDemo/src/main/java/org/richfaces/PersonBean.java	2009-06-18 10:24:25 UTC (rev 14655)
@@ -0,0 +1,52 @@
+/**
+ * License Agreement.
+ *
+ *  JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007  Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces;
+
+
+/**
+ * @author Alex.Kolonitsky
+ *
+ */
+public class PersonBean {
+	private String firstName;
+	private String secondName;
+	private String selectedTab;
+
+    public String getFirstName() {
+        return firstName;
+    }
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+    public String getSecondName() {
+        return secondName;
+    }
+    public void setSecondName(String secondName) {
+        this.secondName = secondName;
+    }
+    public String getSelectedTab() {
+        return selectedTab;
+    }
+    public void setSelectedTab(String selectedTab) {
+        this.selectedTab = selectedTab;
+    }
+}
\ No newline at end of file

Modified: branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/WEB-INF/faces-config.xml	2009-06-18 10:19:43 UTC (rev 14654)
+++ branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/WEB-INF/faces-config.xml	2009-06-18 10:24:25 UTC (rev 14655)
@@ -2,12 +2,17 @@
 <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                               "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
 <faces-config>
- <managed-bean>
-  <managed-bean-name>bean</managed-bean-name>
-  <managed-bean-class>org.richfaces.Bean</managed-bean-class>
-  <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
     <managed-bean>
+        <managed-bean-name>personBean</managed-bean-name>
+        <managed-bean-class>org.richfaces.PersonBean</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
+    <managed-bean>
+        <managed-bean-name>bean</managed-bean-name>
+        <managed-bean-class>org.richfaces.Bean</managed-bean-class>
+        <managed-bean-scope>session</managed-bean-scope>
+    </managed-bean>
+    <managed-bean>
         <managed-bean-name>skinBean</managed-bean-name>
         <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>

Added: branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/pages/RF-7353.jsp
===================================================================
--- branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/pages/RF-7353.jsp	                        (rev 0)
+++ branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/pages/RF-7353.jsp	2009-06-18 10:24:25 UTC (rev 14655)
@@ -0,0 +1,38 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/tabPanel" prefix="tabs"%>
+
+<html>
+<head>
+<title></title>
+<style type="text/css">
+</style>
+</head>
+<body bgcolor="white">
+<f:view>
+    <h:form id="formID">
+		<a4j:keepAlive beanName="personBean" />
+
+		<a4j:form>
+			<tabs:tabPanel switchType="ajax" selectedTab="#{personBean.selectedTab}">
+				<tabs:tab id="tab1" label="firstname">
+					<a4j:region>
+						<h:inputText value="#{personBean.firstName}" />
+					</a4j:region>
+				</tabs:tab>
+				<tabs:tab id="tab2" label="lastname">
+					<a4j:region>
+						<h:inputText value="#{personBean.secondName}" />
+					</a4j:region>
+				</tabs:tab>
+			</tabs:tabPanel>
+		</a4j:form>	
+        <br />
+        <a4j:status startText="Work" stopText="Stop"></a4j:status>
+    </h:form>
+</f:view>
+</body>
+</html>




More information about the richfaces-svn-commits mailing list