ZK upload dialog not working

2019-08-31 14:16发布

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?

标签: java zk
1条回答
▲ chillily
2楼-- · 2019-08-31 14:27

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.

查看更多
登录 后发表回答