01: /* Fileupload.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Thu Nov 24 15:11:04 2005, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2005 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zhtml;
20:
21: import org.zkoss.util.media.Media;
22:
23: import org.zkoss.zk.ui.UiException;
24:
25: /**
26: * A fileupload dialog used to let user upload a file.
27: *
28: * <p>You don't create {@link Fileupload} directly. Rather, use {@link #get()}
29: * or {@link #get(String, String)}.
30: *
31: * <p>A non-XHTML extension.
32: *
33: * @author tomyeh
34: */
35: public class Fileupload {
36: /** Opens a modal dialog with the default message and title,
37: * and let user upload a file.
38: * @return the uploaded content, or null if not ready.
39: */
40: public static Media get() throws InterruptedException {
41: return get(null, null);
42: }
43:
44: /** Opens a modal dialog with the specified message and title,
45: * and let user upload a file.
46: *
47: * @param message the message. If null, the default is used.
48: * @param title the title. If null, the default is used.
49: * @return the uploaded content, or null if not ready.
50: */
51: public static Media get(String message, String title)
52: throws InterruptedException {
53: return org.zkoss.zul.Fileupload.get(message, title);
54: }
55: }
|