-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hello, i have a problem with the fileupload component. i have taken the source code from the zk live demo but when i start the programm i get an error.
the source code:
<zk>
<button label="Upload" upload="true">
<attribute name="onUpload">{
org.zkoss.util.media.Media media = event.getMedia();
if (media instanceof org.zkoss.image.Image) {
org.zkoss.zul.Image image = new org.zkoss.zul.Image();
image.setContent(media);
image.setParent(pics);
} else {
Messagebox.show("Not an image: "+media, "Error", Messagebox.OK, Messagebox.ERROR);
break; //not to show too many errors
}
}</attribute>
</button>
<vbox id="pics" />
</zk>
The error msg:
org.zkoss.zk.ui.metainfo.PropertyNotFoundException: Method setUpload not found for class org.zkoss.zul.Button
thank you for your help.
Whick version of ZK are you using ? ZK Demo is based in ZK 5...
Asked: 2010-03-15 09:08:41 +0800
Seen: 657 times
Last updated: Mar 15 '10