-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am trying to upload a file from button tag as i don't want to use fileupload tag in my zul. whenever i click on the select file button in my zul, it asks for a file from file browser. After selecting the file it again asks me to select a file for the second time. why this is happening ???
My zul file has following Code
<button label="Select File" sclass="login_btn" style="text-align:center" upload="true,maxsize=10240" onupload="@command('selectFile',UEvent = event)"/>
my command is as follows :
@Command @NotifyChange({"fileName"}) public void selectFile(@BindingParam("UEvent") UploadEvent event) { media = event.getMedia(); fileName = media.getName(); if(fileName!=null && fileName.length()>0) { flag=true; } }
I am using zk 7.0.3.
Please help me avoiding the 2nd popup.
Hello sathishk,
Please refer to the following examples in order to accomplish your task (the second example better suits your needs):
http://zkfiddle.org/sample/okpcjh/2-Fileupload-Sample#source-1
http://zkframeworkhint.blogspot.co.uk/2013/05/zk-upload-image-or-image-binding-in.html
Best Regards,
Darksu
Asked: 2015-01-13 12:02:08 +0800
Seen: 14 times
Last updated: Jan 18 '15
Filter fileupload with parameter accept
How save file uploaded into folder local (in disk) ?
File selector window doesn't popup after clicking Upload button
Use parameters in a conditional @command
Having problems with upload button in IE 10+ using ZK 5
MVVM Radio button with form binding
How to handle big (large) file upload?
Below code from jo.js causes "Invalid object calling" error in IE10. Please provide solution.