-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi to everyone!
I have just migrated my application to ZK 3.6.1 (previous version used was 3.5.2).
In my application I have a window which shows, inside an iframe component, a pdf file dinamically created. This is the code:
<window width="90%" height="90%" mode="modal" border="normal" closable="true"> <zscript> <![CDATA[ void load(){ // gets the outputstream java.io.ByteArrayOutputStream os = ... byte[] bcontent = os.toByteArray(); // close outputstream os.close(); org.zkoss.util.media.AMedia media = new org.zkoss.util.media.AMedia("myfolder", "pdf", "application/pdf", bcontent); iframe.setContent(media); } ]]> </zscript> <iframe id="iframe" width="100%" height="100%"> <attribute name="onCreate"> Clients.showBusy("Loading...", true); Events.echoEvent("onLater", self, null); </attribute> <attribute name="onLater"> Thread.sleep(2000); Clients.showBusy(null, false); load(); </attribute> </iframe> </window>
Asked: 2009-05-25 08:00:29 +0800
Seen: 346 times
Last updated: Jun 18 '09