Revision history [back]

click to hide/show revision 1
initial version

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

sathishk gravatar image sathishk

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

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:label>Description<h:strong> * </h:strong> </h:label> <textbox rows="4" width="100%" value="@bind(vm.pattribute.description)" visible="@load(vm.submitbutton)"></textbox>
<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.

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

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:label>Description<h:strong> * </h:strong> </h:label> <textbox rows="4" width="100%" value="@bind(vm.pattribute.description)" visible="@load(vm.submitbutton)"></textbox>
<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.

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

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.

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

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.

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

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.

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