Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top