myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r418562 - in /myfaces/tobago/trunk/example/test/src/main: java/org/apache/myfaces/tobago/example/test/TestBean.java webapp/fileUpload.jsp
Date Sun, 02 Jul 2006 08:30:55 GMT
Author: bommel
Date: Sun Jul  2 01:30:54 2006
New Revision: 418562

URL: http://svn.apache.org/viewvc?rev=418562&view=rev
Log:
added fileUpload to example test

Added:
    myfaces/tobago/trunk/example/test/src/main/webapp/fileUpload.jsp
Modified:
    myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/TestBean.java

Modified: myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/TestBean.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/TestBean.java?rev=418562&r1=418561&r2=418562&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/TestBean.java
(original)
+++ myfaces/tobago/trunk/example/test/src/main/java/org/apache/myfaces/tobago/example/test/TestBean.java
Sun Jul  2 01:30:54 2006
@@ -18,6 +18,8 @@
 
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.Log;
+import org.apache.commons.fileupload.FileItem;
+
 import java.sql.Statement;
 import java.sql.DriverManager;
 import java.sql.Connection;
@@ -47,6 +49,7 @@
   private String eccen;
   private String discoverer;
   private String discoverYear;
+  private FileItem file;
 
   public TestBean() {
 
@@ -192,6 +195,15 @@
 
     return "solarList";
 
+  }
+
+  public FileItem getFile() {
+    return file;
+  }
+
+  public void setFile(FileItem file) {
+    LOG.error("Setting fileItem "+ file);
+    this.file = file;
   }
 
   public ResultSet getSolarObjects() {

Added: myfaces/tobago/trunk/example/test/src/main/webapp/fileUpload.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/fileUpload.jsp?rev=418562&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/fileUpload.jsp (added)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/fileUpload.jsp Sun Jul  2 01:30:54 2006
@@ -0,0 +1,14 @@
+<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
+<%@ taglib uri="http://myfaces.apache.org/tobago/extension" prefix="tx" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<f:view>
+  <tc:page>
+    <f:facet name="layout">
+      <tc:gridLayout/>
+    </f:facet>
+    <tc:out value="Hello World"/>
+    <tc:file label="test" value="#{test.file}" />
+    <tc:button label="Submit" defaultCommand="true" />
+  </tc:page>
+</f:view>
\ No newline at end of file



Mime
View raw message