ZK upload dialog not working

余生长醉 提交于 2019-12-13 02:47:58

问题


I am using Fileupload.get() to upload file and that is working fine.

However, I want to change how the upload dialog look (like add more button and change position of the text) so I modified the fileuploaddlg.zul in my zkStyle/web/zul/html folder and in my java code I added Fileupload.setTemplate("~./zul/html/fileuploaddlg.zul") before Fileupload.get().

This didn't modify upload dialog at all so I added fileuploaddlg2.zul to zkStyle/web/zul/html folder and changed setTemplate to Fileupload.setTemplate("~./zul/html/fileuploaddlg2.zul"). This time I got an error saying ~./zul/html/fileuploaddlg2.zul doesnt't exist.

What am I doing wrong? how can I modify how the upload dialog look?


回答1:


If an URI starting with ~./, ZK assumes the resource is from the class path. So you should move your template file to the class path. Another option (and I think the one you are looking for) is to use URI that is relative to the webapp context root, and in that case don't use ~./ prefix.



来源:https://stackoverflow.com/questions/19669095/zk-upload-dialog-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!