|
| 1 | +/* |
| 2 | + * Permission to use, copy, modify, and/or distribute this software for any |
| 3 | + * purpose with or without fee is hereby granted. |
| 4 | + * |
| 5 | + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIMS ALL WARRANTIES |
| 6 | + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 7 | + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR |
| 8 | + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 9 | + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
| 10 | + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 11 | + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 12 | + */ |
| 13 | +package jakartaee.samples.jsf.inputFile; |
| 14 | + |
| 15 | +import java.util.Date; |
| 16 | +import javax.inject.Named; |
| 17 | +import javax.enterprise.context.RequestScoped; |
| 18 | +import javax.servlet.http.Part; |
| 19 | + |
| 20 | +/** |
| 21 | + * A request scoped bean for using with the h:inputFile example. |
| 22 | + * |
| 23 | + * @author Manfred Riem ([email protected]) |
| 24 | + */ |
| 25 | +@Named(value = "inputFileBean") |
| 26 | +@RequestScoped |
| 27 | +public class InputFileBean { |
| 28 | + |
| 29 | + /** |
| 30 | + * Stores the part. |
| 31 | + */ |
| 32 | + private Part part; |
| 33 | + |
| 34 | + /** |
| 35 | + * Get the file (part). |
| 36 | + * |
| 37 | + * @return the time. |
| 38 | + */ |
| 39 | + public Part getFile() { |
| 40 | + return part; |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * Set the file. |
| 45 | + * |
| 46 | + * @param part the part. |
| 47 | + */ |
| 48 | + public void setFile(Part part) { |
| 49 | + this.part = part; |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * Submit. |
| 54 | + * |
| 55 | + * @return "" |
| 56 | + */ |
| 57 | + public String submit() { |
| 58 | + return ""; |
| 59 | + } |
| 60 | +} |
0 commit comments