Processing...
Description & Source Code

ZK iframe allows developer to set its content, such as images and audio, directly, in addition to URLs. Developers could leverage this feature to generate contents dynamically; for example, a PDF report generated by JasperReports.

iframe.zul
<iframe id="iframe" src="https://www.zkoss.org" 
	width="100%" height="400px" style="border: 1px solid gray" />
		
iframe_ctrl.zul
<button upload="true" label="Select File">
	<attribute name="onUpload"><![CDATA[
		Object media = event.getMedia();
		if (media != null)
			iframe.setContent(media);
	]]></attribute>
</button>