-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all!
I have created a download link. It is possible to call that link by clicking an Icon or the download button in context menu.
Clicking the Icon, the browser download window opens and everything is fine.
Clicking the button in context menu, the browser download window opens as well, but there also appears a progress popup, that only disappears, if I click another usefull button. There is no Javascript loaded in the back.
Does anyone know, how I could solve that problem?
Some of my Code:
The Icon, rendered in a List:
StringBuffer content = new StringBuffer();
String link = createDownloadLink(file);
content.append("<a href=\"");
content.append(link);
content.append("\">");
content.append("<img src=\"images/virtualstorage/download.png\" width=\"16\" height=\"16\"/>");
content.append("<a>");
Html html = new Html();
html.setContent(content.toString());
html.setParent(actCell);
The Menuitem:
Menuitem downloadFileItem = new Menuitem("Download");
downloadFileItem.setImage("...");
downloadFileItem.setDisabled(!permissions.readPermission);
downloadFileItem.setHref(createDownloadLink((FileInfoDMO)item.getValue()));
private String createDownloadLink (FileInfoDMO file)
{
return "VirtualStorageDataDeliveryServlet?fileid=" + file.getFileId();
}
Hey lb,
Is the progress bar a native browser progress bar or a ZK one?
Is it possible to provide me with the full zul and java code so I can test it locally please?
Thanks,
Tim
Hi Tim,
thanks for answering.
I'm afraid I can't give you the full code for different reasons.
But it is a zk progress bar.
The weird thing is that the problem only appears when I call the href over Menuitem.
Everthing works fine calling it over the image.
Thanks,
lb
Hey lb,
No problem. If you cannot pass me the total code can you replicate in a smaller zul file? What version of ZK are you using?
If you can replicate it using a smaller ZUL & controller please send it to me and I will take a look at it.
Thanks,
Tim
Hi Tim,
to replicate the problem in a smaller zul file seems to be quite complex. I tried but it didn't work out yet.
Don't you have a tip what the problem might be, so that I can test, if that is the reason in my case?
Thank you very much!
Lisanne
I am trying to think about this...I presume by progress bar you are talking about the loading symbol? Can you try checking whether there is a command send back to the server and whether the node contains a href link?
It is very hard to work through this issue without the ability to replicate. Any chance I could access this system and see it for myself?
Thanks,
Tim
Hi @ll,
i am trying to solve this problem. But it doesn't work also with zk version 3.6.4.
The Button in contect menu call a servlet, the browser download window opens as well, but there also appears a a "z-loading-indicator", that only disappears, if I click another usefull button.
When i clicking a Icon with the same link, the browser download window opens and everything is fine.
How can I solve this Problem?
Asked: 2010-02-16 03:56:16 +0800
Seen: 905 times
Last updated: Apr 27 '10