View Javadoc

1   package org.appfuse.webapp.pages;
2   
3   import org.apache.tapestry5.PersistenceConstants;
4   import org.apache.tapestry5.annotations.Persist;
5   import org.apache.tapestry5.annotations.Property;
6   import org.appfuse.webapp.data.FileData;
7   
8   /**
9    * This class handles the uploading of a file and writing it to
10   * the filesystem.  Eventually, it will also addChild support for persisting the
11   * files information into the database.
12   *
13   * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
14   * @author Serge Eby
15   * @version $Id: FileDisplay.java 5 2008-08-30 09:59:21Z serge.eby $
16   */
17  public class FileDisplay {
18  
19  
20      @Persist(PersistenceConstants.FLASH)
21      @Property(write = false)
22      private FileData fileData;
23  
24  
25      public void setFileData(FileData fileData) {
26          this.fileData = fileData;
27      }
28  
29      Object onDone() {
30          return Home.class;
31      }
32  
33      Object onAnotherUpload() {
34          return FileUpload.class;
35      }
36  
37  }