-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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 Code
<h:p></h:p>
<div class="attache">
<label value="@bind(vm.fileName)" ></label>
</div>
<button label="Select File" sclass="login_btn" style="text-align:center" upload="true,maxsize=10240" onUpload = "@command('selectFile',UEvent = event)" />
<button sclass="login_btn orng_btn" style="margin-left:20px;" label="Save As Draft" visible="@load(vm.submitbutton)" onClick="@command('submit',IsSubmit = false)" />
<button sclass="login_btn orng_btn" style="margin-left:20px;" label="Save And Submit" visible="@load(vm.submitbutton)" onClick="@command('submitApproval')" />
</div>
my command is as follows :
@Command @NotifyChange({"fileName"}) public void selectFile(@BindingParam("UEvent") UploadEvent event) { System.out.println("called....."); 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.
2 | No.2 Revision |
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 Code
<h:p></h:p>
<div class="attache">
<label value="@bind(vm.fileName)" ></label>
</div>
<button label="Select File" sclass="login_btn" style="text-align:center" upload="true,maxsize=10240" onUpload onupload="@command('selectFile',UEvent = "@command('selectFile',UEvent = event)" />
<button sclass="login_btn orng_btn" style="margin-left:20px;" label="Save As Draft" visible="@load(vm.submitbutton)" onClick="@command('submit',IsSubmit = false)" />
<button sclass="login_btn orng_btn" style="margin-left:20px;" label="Save And Submit" visible="@load(vm.submitbutton)" onClick="@command('submitApproval')" />
</div>
event)"/> my command is as follows :
@Command @NotifyChange({"fileName"}) public void selectFile(@BindingParam("UEvent") UploadEvent event) { System.out.println("called....."); 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.
3 | No.3 Revision |
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) { System.out.println("called....."); 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.
4 | No.4 Revision |
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) {
System.out.println("called.....");
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.
5 | No.5 Revision |
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.