0

double popup for file selection in button tag with upload as true

asked 2015-01-13 12:02:08 +0800

sathishk gravatar image sathishk
17 5

updated 2015-01-13 12:22:29 +0800

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.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-01-18 10:27:56 +0800

Darksu gravatar image Darksu
1991 1 4

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

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-01-13 12:02:08 +0800

Seen: 14 times

Last updated: Jan 18 '15

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