Revision history [back]

click to hide/show revision 1
initial version

answered 2009-07-09 02:58:00 +0800

timshiu gravatar image timshiu

Let me summarize my questions again. What I want to do is to get the file binary from client side.

1) I tried use FileUpload control in ZK, but the FileUpload control throw error when Upload button is clicked. Error message: org.apache.commons.fileupload.servlet.ServletFileUpload.setProgressListener(Lorg/apache/commons/fileupload/ProgressListener;)V The error message is just shown at the UI and I cannot find any exception stack. (The error only thrown in my Portal page but just fine in normal webpage)

2) Then, I want to find if any workaround existed to get the file binary. (This is my first question) I tried to write the sample code: <zk> <window title="File Upload" border="normal" xmlns:h="&lt;a href=" http:="""" 1999="" xhtml"="">"> <h:input id="fileUpload" type="file"/> <button label="Test"> <attribute name="onClick"> // Get the file binary from fileUpload control // .... </attribute> </button> </window> </zk>

But I don't know if ZK is able to get the file binary from the pure xhtml control. (i.e. I don't know what function should be called in the onClick function of the Test button)

So, my questions are: 1) Does anyone know what's wrong with the FileUpload control for my case???? What can I do to get the exception stack. 2) Is there any workaround for file upload???? e.g. get the file binary directly from xhtml

Thanks a lot.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More