0

Datebox and jasperreport - cannot see calendar popup

asked 2010-10-18 06:53:11 +0800

tomekcz gravatar image tomekcz
48 1

Here is the code that can be run in demo page:

<zk>
	Choice the file type : <listbox id="format" mold="select" onSelect="showReport()" >
		<listitem label="PDF" value="pdf" selected="true" />
	</listbox>
        <datebox/>
	<button label="Report!" onClick='showReport()'/>
	<jasperreport id="report" height="360px" />
	
	<zscript>
		import org.zkoss.zkdemo.userguide.CustomDataSource;
		
		void showReport() {
			//Preparing parameters
			Map parameters = new HashMap();
			parameters.put("ReportTitle", "Address Report");
			parameters.put("DataFile", "CustomDataSource from java");
			
			report.setSrc("/userguide/data/jasperreport.jasper");
			report.setParameters(parameters);
			report.setDatasource(new CustomDataSource());
			report.setType((String) format.getSelectedItem().getValue());
		}
	</zscript>
</zk>

When click on calendar icon popup window does not show (it looks like it is hidden behind jasperreport)
I tried to play with z-index but with no success.

Any help?

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2010-10-18 23:00:44 +0800

samchuang gravatar image samchuang
4084 4

Hi

I try your code at ZK sandbox, I tested on FF36, IE8, it worked fine.

What kind of browser do you use ?

link publish delete flag offensive edit

answered 2010-10-19 06:56:23 +0800

tomekcz gravatar image tomekcz
48 1

I use IE8 and FF36 also.
It happen when the report is loaded (pdf is displayed) and then when you try to change the date range, you cannot see calendar popup window.
Well, the effect is that it shows for a second and immediately hides behind pdf frame so is not usable anymore.

link publish delete flag offensive edit

answered 2010-10-19 12:57:29 +0800

tomekcz gravatar image tomekcz
48 1

I found this:
http://docs.zkoss.org/wiki/Zk.useStackup#cite_note-0
but sadly it still does not work.

Please help.

link publish delete flag offensive edit

answered 2010-10-19 19:56:27 +0800

samchuang gravatar image samchuang
4084 4

Hi

thanks for your info, I tested the sample code on that link you provide. the sample code work

you can test at ZK sandbox

sample code

<?xml version="1.0" encoding="UTF-8"?>
<?script content="zk.useStackup = 'auto/gecko';"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" ?>
<zk>
<menubar width="100%">
	<menu label="test">
	<menupopup>
	<menuitem label="test"/>
	<menuitem label="test"/>
	<menuitem label="test"/>
	<menuitem label="test"/>
	</menupopup>
	</menu>
</menubar>
<window title="iframe/pdf" border="normal" width="500px" sizable="true">
	<iframe style="background-color:transparent" src="/test2/B1896797.pdf"
	width="100%" autohide="true"/>
	<separator/>
	<button label="overlapped" onClick="self.parent.doOverlapped()"/>
	<button label="embedded" onClick="self.parent.doEmbedded()"/>
</window>
<window title="iframe/pdf" border="normal" width="500px" sizable="true">
	<iframe style="background-color:transparent" src="/test2/B1896797.pdf"
	width="100%" autohide="true"/>
	<separator/>
	<button label="overlapped" onClick="self.parent.doOverlapped()"/>
	<button label="embedded" onClick="self.parent.doEmbedded()"/>
</window>
</zk>

link publish delete flag offensive edit

answered 2010-10-19 20:36:00 +0800

tomekcz gravatar image tomekcz
48 1

Could you provide working example with jasperreport control?

For me it still does not work with jasperreport, tried this in ZK sandbox:

<?script content="zk.useStackup = 'auto/gecko';"?>
<zk>
	Choice the file type : <listbox id="format" mold="select" onSelect="showReport()" >
		<listitem label="PDF" value="pdf" selected="true" />
		<listitem label="XML" value="xml" />
		<listitem label="HTML" value="html" />
		<listitem label="Word (RTF)" value="rtf" />
		<listitem label="Excel" value="xls" />
		<listitem label="Excel (JXL)" value="jxl" />
		<listitem label="CSV" value="csv" />
		<listitem label="OpenOffice (ODT)" value="odt" unless="false"/>
	</listbox>
        <datebox/>
	<button label="Report!" onClick='showReport()'/>
	<jasperreport id="report" height="360px" autohide="true"/>
	<zscript>
		import org.zkoss.zkdemo.userguide.CustomDataSource;
		
		void showReport() {
			//Preparing parameters
			Map parameters = new HashMap();
			parameters.put("ReportTitle", "Address Report");
			parameters.put("DataFile", "CustomDataSource from java");
			
			report.setSrc("/userguide/data/jasperreport.jasper");
			report.setParameters(parameters);
			report.setDatasource(new CustomDataSource());
			report.setType((String) format.getSelectedItem().getValue());
		}
	</zscript>
</zk>

link publish delete flag offensive edit

answered 2010-10-21 02:11:37 +0800

samchuang gravatar image samchuang
4084 4

updated 2010-10-21 07:05:32 +0800

Hi

I have post bug here

link publish delete flag offensive edit

answered 2010-10-21 07:26:37 +0800

samchuang gravatar image samchuang
4084 4

Hi

in Firefox, when use moz-border-radius will cause this error

remove the moz-border-radiu by

	<style>
		.z-combobox-rounded-shadow, .z-bandbox-rounded-shadow,
		.z-datebox-rounded-shadow, .z-combobox-shadow, .z-bandbox-shadow,
		.z-datebox-shadow {
			-moz-border-radius: 0;
		}
	</style>

this can fix issue in FF

link publish delete flag offensive edit

answered 2010-10-21 09:54:59 +0800

tomekcz gravatar image tomekcz
48 1

Hi.

Thanks for your help. Now it works in FF36, but it still is problem in IE.

I posted another question related to jasperreport here
Maybe you can also help me on that one.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-10-18 06:53:11 +0800

Seen: 959 times

Last updated: Oct 21 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More