zul
Class Upload

java.lang.Object
  extended by zk.Object
      extended by zul.Upload

public class Upload
extends Object

Helper class for implementing the fileupload.


Field Summary
 
Fields inherited from class zk.Object
$class, $oid
 
Method Summary
 void $init(Widget wgt, DOMElement parent, String clsnm)
          Constructor
 void cancel(int sid)
          Cancels the fileupload if the fileupload is progressing.
static void close(String uuid, int sid)
          Closes the fileupload
 void destroy()
          Destroys the fileupload.
static void destroy(java.lang.Object uplder)
          Destroys the uploader to upload
static void error(String msg, String uuid, int sid)
          Shows the error message of the fileupload
 void finish(int sid)
          Finishes the fileupload if the fileupload is done.
 String getKey()
          Returns the uuid of the uploader with its sequential number
static boolean isFinish(Widget wgt)
          Returns the fileupload of the widget whether is finish or not.
static void sendResult(String uuid, String contentId, int sid)
          Sends the upload result to server.
static void start(java.lang.Object uplder)
          Starts the uploader to upload a file.
 void sync()
          Synchronizes the visual states of the element with fileupload
 
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

$init

public void $init(Widget wgt,
                  DOMElement parent,
                  String clsnm)
Constructor

Parameters:
wgt - the widget belongs to the file upload
parent - the element representing where the upload element is appended
clsnm - the CSS class name of the fileupload

sync

public void sync()
Synchronizes the visual states of the element with fileupload


destroy

public void destroy()
Destroys the fileupload. You cannot use this object any more.


getKey

public String getKey()
Returns the uuid of the uploader with its sequential number

Returns:
String the key of the uploader

cancel

public void cancel(int sid)
Cancels the fileupload if the fileupload is progressing.

Parameters:
sid - the sequential number of the uploader

finish

public void finish(int sid)
Finishes the fileupload if the fileupload is done.

Parameters:
sid - the sequential number of the uploader

error

public static void error(String msg,
                         String uuid,
                         int sid)
Shows the error message of the fileupload

Parameters:
msg - the error message
uuid - the ID of the widget
sid - the sequential number of the uploader

close

public static void close(String uuid,
                         int sid)
Closes the fileupload

Parameters:
uuid - the ID of the widget
sid - the sequential number of the uploader

sendResult

public static void sendResult(String uuid,
                              String contentId,
                              int sid)
Sends the upload result to server.

Parameters:
uuid - the ID of the widget
contentId - the ID of the content being uploaded
sid - the sequential number of the uploader

isFinish

public static boolean isFinish(Widget wgt)
Returns the fileupload of the widget whether is finish or not.

Parameters:
wgt - the widget
Returns:
boolean

start

public static void start(java.lang.Object uplder)
Starts the uploader to upload a file.

Parameters:
uplder - the uploader

destroy

public static void destroy(java.lang.Object uplder)
Destroys the uploader to upload

Parameters:
uplder -


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo