[richfaces-svn-commits] JBoss Rich Faces SVN: r5016 - in trunk/sandbox/samples: progressBarDemo and 17 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Dec 26 12:01:15 EST 2007


Author: andrei_exadel
Date: 2007-12-26 12:01:15 -0500 (Wed, 26 Dec 2007)
New Revision: 5016

Added:
   trunk/sandbox/samples/progressBarDemo/
   trunk/sandbox/samples/progressBarDemo/pom.xml
   trunk/sandbox/samples/progressBarDemo/src/
   trunk/sandbox/samples/progressBarDemo/src/main/
   trunk/sandbox/samples/progressBarDemo/src/main/java/
   trunk/sandbox/samples/progressBarDemo/src/main/java/org/
   trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/
   trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/
   trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/
   trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
   trunk/sandbox/samples/progressBarDemo/src/main/resources/
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/META-INF/
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/META-INF/MANIFEST.MF
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/index.jsp
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml
   trunk/sandbox/samples/progressBarDemo/src/test/
   trunk/sandbox/samples/progressBarDemo/src/test/java/
   trunk/sandbox/samples/progressBarDemo/src/test/java/org/
   trunk/sandbox/samples/progressBarDemo/src/test/java/org/richfaces/
   trunk/sandbox/samples/progressBarDemo/src/test/java/org/richfaces/sandbox/
   trunk/sandbox/samples/progressBarDemo/src/test/java/org/richfaces/sandbox/samples/
   trunk/sandbox/samples/progressBarDemo/src/test/java/org/richfaces/sandbox/samples/BeanTest.java
Log:
RF-1698 

Added: trunk/sandbox/samples/progressBarDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/pom.xml	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/pom.xml	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?><project>
+  <parent>
+    <artifactId>samples</artifactId>
+    <groupId>org.richfaces.sandbox</groupId>
+    <version>3.2.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.richfaces.sandbox.samples</groupId>
+  <artifactId>progressBarDemo</artifactId>
+  <packaging>war</packaging>
+  <name>progressBarDemo Maven Webapp</name>
+  <version>3.2.0-SNAPSHOT</version>
+  <build>
+    <finalName>progressBarDemo</finalName>
+  	<plugins>
+  				<plugin>
+  					<groupId>org.apache.maven.plugins</groupId>
+  					<artifactId>maven-compiler-plugin</artifactId>
+  					<configuration>
+  						<source>1.5</source>
+  						<target>1.5</target>
+  					</configuration>
+  				</plugin>
+  			</plugins>
+  </build>
+	<dependencies>
+		<dependency>
+					<groupId>org.richfaces.sandbox.ui</groupId>
+					<artifactId>progressBar</artifactId>
+					<version>3.2.0-SNAPSHOT</version>
+				</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,79 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.sandbox.samples;
+
+
+import java.util.Date;
+
+import javax.faces.event.ActionEvent;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+    
+    private Boolean enabled = false;
+    
+    private Integer value = 0;
+    
+    public String start() {
+	this.enabled = true;
+	return null;
+    }
+    
+    public String getDate() {
+	Date date = new Date();
+	return date.toLocaleString();
+    }
+
+    /**
+     * @return the value
+     */
+    public Integer getValue() {
+	return value ++;
+    }
+
+    /**
+     * @param value the value to set
+     */
+    public void setValue(Integer value) {
+        this.value = value;
+    }
+
+    /**
+     * @return the enabled
+     */
+    public Boolean getEnabled() {
+        return enabled;
+    }
+
+    /**
+     * @param enabled the enabled to set
+     */
+    public void setEnabled(Boolean enabled) {
+        this.enabled = enabled;
+    }
+    
+    
+	
+}
\ No newline at end of file

Added: trunk/sandbox/samples/progressBarDemo/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/META-INF/MANIFEST.MF	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/META-INF/MANIFEST.MF	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+

Added: trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess">
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:" SHAPE="32,17,0,0">
+  <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules::0" NAME="item">
+   <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+    ID="xhtml::#faces#pages#index.xhtml" NAME="output"
+    PATH="/faces/pages/index.xhtml"
+    TARGET="rules:#faces#pages#index.xhtml" TITLE="xhtml"/>
+   <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+    ID="jsp::#faces#pages#index.jsp" NAME="output1"
+    PATH="/faces/pages/index.jsp" TARGET="rules:#faces#pages#index.jsp" TITLE="jsp"/>
+  </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+  NAME="rules:#faces#pages#index.jsp" PATH="/faces/pages/index.jsp" SHAPE="256,177,0,0"/>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+  NAME="rules:#faces#pages#index.xhtml" PATH="/faces/pages/index.xhtml" SHAPE="256,33,0,0"/>
+</PROCESS>

Added: trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!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.sandbox.samples.Bean</managed-bean-class>
+  <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <navigation-rule>
+  <display-name>xhtml</display-name>
+  <navigation-case>
+  <from-outcome>xhtml</from-outcome>
+  <to-view-id>/faces/pages/index.xhtml</to-view-id>
+  </navigation-case>
+  <navigation-case>
+  <from-outcome>jsp</from-outcome>
+  <to-view-id>/faces/pages/index.jsp</to-view-id>
+  </navigation-case>
+  </navigation-rule>
+</faces-config>

Added: trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+  <param-name>javax.faces.CONFIG_FILES</param-name>
+  <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+  <param-value>server</param-value>
+ </context-param>
+ <!-- Use Documents Saved as *.xhtml -->	
+ <context-param>
+    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+    <param-value>.jsp</param-value>
+  </context-param>
+
+  <!-- Facelets pages will use the .xhtml extension -->
+  <context-param>
+    <param-name>facelets.VIEW_MAPPINGS</param-name>
+    <param-value>*xhtml</param-value>
+  </context-param>   
+  
+   <context-param>
+  <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+  <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+
+ <!-- 
+ --> 
+ <filter>
+  <display-name>Ajax4jsf Filter</display-name>
+  <filter-name>ajax4jsf</filter-name>
+  <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+  <filter-name>ajax4jsf</filter-name>
+  <servlet-name>Faces Servlet</servlet-name>
+  <dispatcher>REQUEST</dispatcher>
+  <dispatcher>FORWARD</dispatcher>
+  <dispatcher>INCLUDE</dispatcher>
+  <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ <!-- Faces Servlet -->
+  <servlet>
+    <servlet-name>Faces Servlet</servlet-name>
+    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+  </servlet>
+ 
+  <!-- Use prefix mapping for Facelets pages, e.g. http://localhost:8080/webapp/faces/mypage.xhtml -->
+  <servlet-mapping>
+    <servlet-name>Faces Servlet</servlet-name>
+    <url-pattern>/faces/*</url-pattern>
+  </servlet-mapping>
+
+ 
+ <login-config>
+  <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>

Added: trunk/sandbox/samples/progressBarDemo/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/index.jsp	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/index.jsp	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,12 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+	<body>
+		<a href="faces/pages/index.jsp">JSP</a><br/>
+		<a href="faces/pages/index.xhtml">XHTML</a>
+	</body>
+
+</html>
\ No newline at end of file

Added: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,52 @@
+<%@ 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/ui/progressBar" prefix="progressBar" %>
+<html>
+	<head>
+		<title></title>
+		<style>
+			.complete {
+				background-color: green; 
+				font-size: 9px;
+				}
+			.remain {
+				background-color: #FCBBCD;
+			}
+		</style>
+	</head>
+	<body>
+	<f:view>
+	
+		
+	<h:form>
+	<progressBar:progressBar value="#{bean.value}" enabled="#{bean.enabled}" id="progrs"
+			interval="500" 
+			style="width: 500px; height: 15px;"
+			determined="true"
+			completeClass="complete"
+			reRender="per1"
+			reRenderAfterComplete="per2">
+		<f:facet name="initial">
+			<h:outputText value="Process not started"></h:outputText>
+		</f:facet>
+		<f:facet name="completed">
+			<h:outputText value="Process completed"></h:outputText>
+		</f:facet>
+	</progressBar:progressBar>
+	<br clear="all"/>
+	<table><tr>
+	<td>ReRender:</td><td><h:outputText value="#{bean.date}" id="per1"></h:outputText></td></tr><tr>
+	<td>ReRender after complete:</td><td><h:outputText value="#{bean.date}" id="per2"></h:outputText></td>
+	</tr></table></h:form>
+	
+	<h:form>
+	Enabled: <h:selectBooleanCheckbox value="#{bean.enabled}" id="flag">
+		<a4j:support event="onclick" reRender="progrs"></a4j:support>
+	</h:selectBooleanCheckbox>
+	</h:form>
+	
+	
+	</f:view>
+	</body>	
+</html>

Added: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,37 @@
+<!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:a4j="https://ajax4jsf.dev.java.net/ajax"
+      xmlns:c="http://java.sun.com/jsp/jstl/core" 
+      xmlns:progressBar="http://labs.jboss.com/jbossrichfaces/ui/ui/progressBar" 
+      >
+
+	<f:view>
+		
+	<h:form>
+	<progressBar:progressBar value="#{bean.value}" enabled="#{bean.enabled}" id="progrs"
+			interval="500" 
+			style="width: 300px; height: 15px;"
+			determined="true"
+			reRender="per1"
+			permanent="true"
+			reRenderAfterComplete="per2">
+		<f:facet name="initial">
+			<h:commandButton value="Start" action="#{bean.start}"></h:commandButton>
+		</f:facet>
+		<f:facet name="completed">
+			<h:outputText value="Process completed"></h:outputText>
+		</f:facet>
+	</progressBar:progressBar>
+	<br clear="all"/>
+	<table><tr>
+	<td>ReRender:</td><td><h:outputText value="#{bean.date}" id="per1"></h:outputText></td></tr><tr>
+	<td>ReRender after complete:</td><td><h:outputText value="#{bean.date}" id="per2"></h:outputText></td>
+	</tr></table>
+	</h:form>
+		
+	</f:view>
+
+</html>	
\ No newline at end of file

Added: trunk/sandbox/samples/progressBarDemo/src/test/java/org/richfaces/sandbox/samples/BeanTest.java
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/test/java/org/richfaces/sandbox/samples/BeanTest.java	                        (rev 0)
+++ trunk/sandbox/samples/progressBarDemo/src/test/java/org/richfaces/sandbox/samples/BeanTest.java	2007-12-26 17:01:15 UTC (rev 5016)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.sandbox.samples;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public BeanTest( String testName )
+    {
+        super( testName );
+    }
+
+    public void testStub() throws Exception {
+    	
+    }
+}




More information about the richfaces-svn-commits mailing list