Java Doc for Fileupload.java in  » Ajax » zk » org » zkoss » zul » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » zk » org.zkoss.zul 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.zkoss.zk.ui.HtmlBasedComponent
   org.zkoss.zul.Fileupload

Fileupload
public class Fileupload extends HtmlBasedComponent (Code)
A fileupload dialog used to let user upload a file.

There are two ways to use Fileupload :

1. Open as a modal dialog:

You don't create Fileupload directly. Rather, use Fileupload.get() or Fileupload.get(String,String) .

2. Embed as part of the page:

You can create it as a component and then listen to the onUpload event ( UploadEvent ). If the cancel button is pressed or file(s) is uploaded, the onClose event ( org.zkoss.zk.ui.event.Event ). is sent to notify the application. By default, it does nothing but invalidate the component, i.e., all fields are cleared.

A non-XUL extension.
author:
   tomyeh
See Also:   Filedownload


Inner Class :protected class ExtraCtrl extends HtmlBasedComponent.ExtraCtrl implements Updatable



Method Summary
public static  Mediaget()
     Opens a modal dialog with the default message and title, and let user upload a file.
public static  Mediaget(boolean alwaysNative)
     Opens a modal dialog with the default message and title, and let user upload a file.
Parameters:
  alwaysNative - whether to treat the uploaded file as binarystream, regardless its content type.If false (the default), it will convert toorg.zkoss.image.Image, org.zkoss.sound.Audio,binary stream, or text files depending on the content type.
public static  Mediaget(String message, String title)
     Opens a modal dialog with the specified message and title, and let user upload a file.
Parameters:
  message - the message.
public static  Mediaget(String message, String title, boolean alwaysNative)
     Opens a modal dialog with the specified message and title, and let user upload a file.
Parameters:
  message - the message.
public static  Media[]get(int max)
     Opens a modal dialog to upload mulitple files with the default message and title.
Parameters:
  max - the maximal allowed number that an user can uploadat once.
public static  Media[]get(int max, boolean alwaysNative)
     Opens a modal dialog to upload mulitple files with the default message and title.
Parameters:
  max - the maximal allowed number that an user can uploadat once.
public static  Media[]get(String message, String title, int max)
     Opens a modal dialog to upload multiple files with the specified message and title.

The returned format depending on the content type.
Parameters:
  max - the maximal allowed number that an user can uploadat once.

public static  Media[]get(String message, String title, int max, boolean alwaysNative)
     Opens a modal dialog to upload multiple files with the specified message, title and options.
Parameters:
  max - the maximal allowed number that an user can uploadat once.
public  intgetNumber()
     Returns the maximal allowed number of files to upload.
public static  StringgetTemplate()
     Returns the template used to create the upload modal dialog.
public  booleanisChildable()
     No child is allowed.
public  booleanisNative()
     Returns whether to treat the uploaded file(s) as binary, i.e., not to convert it to image, audio or text files.
protected  ObjectnewExtraCtrl()
    
public  voidonClose()
     Hanldes the onClose event which is sent when file(s) is uploaded or when the cancel button is pressed.
public  voidsetNative(boolean alwaysNative)
     Sets whether to treat the uploaded file(s) as binary, i.e., not to convert it to image, audio or text files.
public  voidsetNumber(int maxnum)
     Sets the maximal allowed number of files to upload.
public static  voidsetTemplate(String uri)
     Sets the template used to create the upload modal dialog.



Method Detail
get
public static Media get() throws InterruptedException(Code)
Opens a modal dialog with the default message and title, and let user upload a file. the uploaded content, or null if not uploaded.



get
public static Media get(boolean alwaysNative) throws InterruptedException(Code)
Opens a modal dialog with the default message and title, and let user upload a file.
Parameters:
  alwaysNative - whether to treat the uploaded file as binarystream, regardless its content type.If false (the default), it will convert toorg.zkoss.image.Image, org.zkoss.sound.Audio,binary stream, or text files depending on the content type. the uploaded content, or null if not uploaded.
since:
   3.0.0
See Also:   org.zkoss.zk.ui.util.Configuration.getUploadCharset
See Also:   org.zkoss.zk.ui.util.Configuration.getUploadCharsetFinder



get
public static Media get(String message, String title) throws InterruptedException(Code)
Opens a modal dialog with the specified message and title, and let user upload a file.
Parameters:
  message - the message. If null, the default is used.
Parameters:
  title - the title. If null, the default is used. the uploaded content, or null if not ready.



get
public static Media get(String message, String title, boolean alwaysNative) throws InterruptedException(Code)
Opens a modal dialog with the specified message and title, and let user upload a file.
Parameters:
  message - the message. If null, the default is used.
Parameters:
  title - the title. If null, the default is used.
Parameters:
  alwaysNative - whether to treat the uploaded file as binarystream, regardless its content type.If false (the default), it will convert toorg.zkoss.image.Image, org.zkoss.sound.Audio,binary stream, or text files depending on the content type. the uploaded content, or null if not ready.
since:
   3.0.0
See Also:   org.zkoss.zk.ui.util.Configuration.getUploadCharset
See Also:   org.zkoss.zk.ui.util.Configuration.getUploadCharsetFinder



get
public static Media[] get(int max) throws InterruptedException(Code)
Opens a modal dialog to upload mulitple files with the default message and title.
Parameters:
  max - the maximal allowed number that an user can uploadat once. If nonpositive, 1 is assumed. an array of files that an users has uploaded,or null if uploaded.



get
public static Media[] get(int max, boolean alwaysNative) throws InterruptedException(Code)
Opens a modal dialog to upload mulitple files with the default message and title.
Parameters:
  max - the maximal allowed number that an user can uploadat once. If nonpositive, 1 is assumed.
Parameters:
  alwaysNative - whether to treat the uploaded files as binarystream, regardless its content type.If false (the default), it will convert toorg.zkoss.image.Image, org.zkoss.sound.Audio,binary stream, or text files depending on the content type. an array of files that an users has uploaded,or null if uploaded.
since:
   3.0.0
See Also:   org.zkoss.zk.ui.util.Configuration.getUploadCharset
See Also:   org.zkoss.zk.ui.util.Configuration.getUploadCharsetFinder



get
public static Media[] get(String message, String title, int max) throws InterruptedException(Code)
Opens a modal dialog to upload multiple files with the specified message and title.

The returned format depending on the content type.
Parameters:
  max - the maximal allowed number that an user can uploadat once. If nonpositive, 1 is assumed.If max is larger than 1000, 1000 is assumed. an array of files that an users has uploaded,or null if uploaded.




get
public static Media[] get(String message, String title, int max, boolean alwaysNative) throws InterruptedException(Code)
Opens a modal dialog to upload multiple files with the specified message, title and options.
Parameters:
  max - the maximal allowed number that an user can uploadat once. If nonpositive, 1 is assumed.If max is larger than 1000, 1000 is assumed.
Parameters:
  alwaysNative - whether to treat the uploaded files as binarystream, regardless its content type.If false (the default), it will convert toorg.zkoss.image.Image, org.zkoss.sound.Audio,binary stream, or text files depending on the content type. an array of files that an users has uploaded,or null if uploaded.
since:
   3.0.0



getNumber
public int getNumber()(Code)
Returns the maximal allowed number of files to upload.
since:
   2.4.0



getTemplate
public static String getTemplate()(Code)
Returns the template used to create the upload modal dialog.



isChildable
public boolean isChildable()(Code)
No child is allowed.



isNative
public boolean isNative()(Code)
Returns whether to treat the uploaded file(s) as binary, i.e., not to convert it to image, audio or text files.

Default: false.
since:
   3.0.0
See Also:   org.zkoss.zk.ui.util.Configuration.getUploadCharset
See Also:   org.zkoss.zk.ui.util.Configuration.getUploadCharsetFinder




newExtraCtrl
protected Object newExtraCtrl()(Code)



onClose
public void onClose()(Code)
Hanldes the onClose event which is sent when file(s) is uploaded or when the cancel button is pressed.

By default, it simply invalidates itself, i.e., all fields are cleared. If you want to do something different, you can intercept the onClose event.
since:
   2.4.0




setNative
public void setNative(boolean alwaysNative)(Code)
Sets whether to treat the uploaded file(s) as binary, i.e., not to convert it to image, audio or text files.
Parameters:
  alwaysNative - whether to treat the uploaded file as binarystream, regardless its content type.If false (the default), it will convert toorg.zkoss.image.Image, org.zkoss.sound.Audio,binary stream, or text files depending on the content type.
since:
   3.0.0
See Also:   org.zkoss.zk.ui.util.Configuration.setUploadCharset
See Also:   org.zkoss.zk.ui.util.Configuration.setUploadCharsetFinder



setNumber
public void setNumber(int maxnum) throws WrongValueException(Code)
Sets the maximal allowed number of files to upload.

Default: 1.
Parameters:
  maxnum - the maximal allowed number (positive or negative).Since 3.0.2, the value can be negative, which means no limitation at all and the end user can uploadany numbers he wants (since 3.0.2)
exception:
  WrongValueException - if non-positive, or it exceeds 1000
since:
   2.4.0




setTemplate
public static void setTemplate(String uri)(Code)
Sets the template used to create the upload modal dialog.

The template must follow the default template: ~./zul/html/fileuploaddlg.zul

In other words, just adjust the label and layout and don't change the component's ID.

Note: the template has no effect, if you use Fileupload as a component (and embed it to a page).




Fields inherited from org.zkoss.zk.ui.HtmlBasedComponent
final protected static int RS_NO_DISPLAY(Code)(Java Doc)
final protected static int RS_NO_HEIGHT(Code)(Java Doc)
final protected static int RS_NO_WIDTH(Code)(Java Doc)

Methods inherited from org.zkoss.zk.ui.HtmlBasedComponent
public void focus()(Code)(Java Doc)
final public String getDraggable()(Code)(Java Doc)
final public String getDroppable()(Code)(Java Doc)
public String getHeight()(Code)(Java Doc)
public String getInnerAttrs()(Code)(Java Doc)
public String getLeft()(Code)(Java Doc)
public String getOuterAttrs()(Code)(Java Doc)
protected String getRealSclass()(Code)(Java Doc)
protected String getRealStyle()(Code)(Java Doc)
protected int getRealStyleFlags()(Code)(Java Doc)
public String getSclass()(Code)(Java Doc)
public String getStyle()(Code)(Java Doc)
public String getTooltiptext()(Code)(Java Doc)
public String getTop()(Code)(Java Doc)
public String getWidth()(Code)(Java Doc)
public int getZIndex()(Code)(Java Doc)
protected Object newExtraCtrl()(Code)(Java Doc)
final public void setClass(String sclass)(Code)(Java Doc)
public void setDraggable(String draggable)(Code)(Java Doc)
public void setDroppable(String droppable)(Code)(Java Doc)
public void setHeight(String height)(Code)(Java Doc)
public void setLeft(String left)(Code)(Java Doc)
public void setSclass(String sclass)(Code)(Java Doc)
public void setStyle(String style)(Code)(Java Doc)
public void setTooltiptext(String tooltiptext)(Code)(Java Doc)
public void setTop(String top)(Code)(Java Doc)
public void setWidth(String width)(Code)(Java Doc)
public void setZIndex(int zIndex)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.