Author: andrei_exadel
Date: 2008-02-05 07:45:46 -0500 (Tue, 05 Feb 2008)
New Revision: 5815
Added:
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp
Modified:
trunk/sandbox/samples/fileUploadDemo/pom.xml
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/index.jsp
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
Log:
Modified: trunk/sandbox/samples/fileUploadDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/pom.xml 2008-02-05 12:45:27 UTC (rev 5814)
+++ trunk/sandbox/samples/fileUploadDemo/pom.xml 2008-02-05 12:45:46 UTC (rev 5815)
@@ -12,7 +12,7 @@
<version>3.2.0-SNAPSHOT</version>
<dependencies>
<dependency>
- <groupId>org.richfaces.ui</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>fileUpload</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
@@ -20,7 +20,12 @@
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
<version>3.2.0-SNAPSHOT</version>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>progressBar</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
<build>
<finalName>fileUploadDemo</finalName>
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml 2008-02-05
12:45:27 UTC (rev 5814)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml 2008-02-05
12:45:46 UTC (rev 5815)
@@ -10,18 +10,33 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
- <!--
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
+ <param-value>false</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>
<display-name>FileUpload Filter</display-name>
<filter-name>fileUpload</filter-name>
<filter-class>org.richfaces.org.jboss.seam.web.MultipartFilter</filter-class>
+ <init-param>
+ <param-name>createTempFiles</param-name>
+ <param-value>true</param-value>
+ </init-param>
</filter>
+
<filter-mapping>
<filter-name>fileUpload</filter-name>
<servlet-name>Faces Servlet</servlet-name>
@@ -30,6 +45,7 @@
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
+
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/index.jsp 2008-02-05 12:45:27 UTC
(rev 5814)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/index.jsp 2008-02-05 12:45:46 UTC
(rev 5815)
@@ -5,7 +5,7 @@
<head></head>
<body>
- <jsp:forward page="/pages/index.jsf" />
+ <jsp:forward page="/pages/index2.jsf" />
</body>
</html>
\ No newline at end of file
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-05
12:45:27 UTC (rev 5814)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-05
12:45:46 UTC (rev 5815)
@@ -1,16 +1,30 @@
-<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/ui/fileUpload"
prefix="fu"%>
+<%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/ui/fileUpload"
+ prefix="fu"%>
<html>
- <head>
- <title></title>
- </head>
- <body>
- <f:view>
- <h:form enctype="multipart/form-data" >
- <fu:fileUpload binding="#{bean.fileUpload}"
onclick="window.status=this.value"/>
- <h:commandButton type="submit"
action="#{bean.printFile}"></h:commandButton>
- </h:form>
- </f:view>
- </body>
-</html>
+<head>
+<title></title>
+</head>
+<body>
+<script language="javascript"><!--
+function loader_end() {
+alert("lll");
+}
+//-->
+</script>
+<div style="display: none;"><iframe name="loader"
+ onload="loader_end()"></iframe></div>
+
+<f:view>
+ <h:form target="loader" enctype="multipart/form-data">
+ <fu:fileUpload binding="#{bean.fileUpload}"
+ onclick="window.status=this.value" />
+ <br />
+ <h:commandButton action="#{bean.printFile}"
value="Submit"></h:commandButton>
+ <a4j:commandButton action="#{bean.printFile}"
value="Submit"></a4j:commandButton>
+ </h:form>
+</f:view>
+</body>
+</html>
Added: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp
(rev 0)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp 2008-02-05
12:45:46 UTC (rev 5815)
@@ -0,0 +1,24 @@
+<%@ 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/fileUpload"
+ prefix="fu"%>
+<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/ui/progressBar"
prefix="progressBar" %>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+<h:form>
+<fu:fileUpload>
+ <f:facet name="progress">
+ <progressBar:progressBar style="height: 10px; width: 300px;">
+ </progressBar:progressBar>
+ </f:facet>
+</fu:fileUpload><br/>
+<h:commandButton value="Submit"></h:commandButton>
+</h:form>
+</f:view>
+</body>
+</html>