-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi
when i run the api demo on the zk site itself it works.
but when i copy the same code it gives null always.
i have tried disabling/enabling the event thread.but result is same.
plz help
<zk>
<button label="Upload Image" upload="true,maxsize=300">
<attribute name="onUpload"><![CDATA[
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;
}
]]></attribute>
</button>
<separator />
<vlayout id="pics" height="360px" style="overflow:auto" />
</zk>
Asked: 2012-07-02 13:35:37 +0800
Seen: 129 times
Last updated: Sep 11 '12