problem with zk 5.0.6

asked 2011-03-11 03:29:32 +0800

abhi21284 gravatar image abhi21284

Hi all,

I have a listbox and a panel. when user selects any item into the listbox the panel renders the data according to the selection.
On page load first item of the listbox is selected and in panel data renders for the first item.
It was all working properly until I upgraded ZK version from 5.0.5 to 5.0.6.
The problem is now(with 5.0.6) on page load panel does not render data for first item selected in the listbox. if I select any item manually it works fine.
I checked that onSelect event is being fired at the right time(when page loads) but data is not coming into the panel.

Please help if any one have idea about it


delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2011-03-15 05:24:59 +0800

mjablonski gravatar image mjablonski
1284 3 5


can you post a self-contained simple example which shows the problem?

Cheers, Maik

link publish delete flag offensive edit

answered 2011-05-20 09:15:37 +0800

abhi21284 gravatar image abhi21284

Hi Maik,

Thanks for your reply. I am sorry for my late reply, actually I was stuck badly somewhere.

I reproduce my problem. please see the code. I have 2 zul files. I tested below code with 5.0.5 and it worked as expected but did not work with 5.0.6

main zul


	<window title="Hello World!!" border="normal" width="100%" id="win"

			<listbox id="listbox" width="40%"><attribute name="onSelect"><![CDATA[
	desktopScope.put("key", self.getSelectedItem().getLastChild().getLabel());
				<attribute name="onCreate">

	org.zkoss.zk.ui.event.Events.postEvent("onSelect", self, "");

					<listheader label="Author" sort="auto" />
					<listheader label="Title" sort="auto" />
					<listheader label="Publisher" sort="auto" />
					<listheader label="Hardcover" sort="auto" />
					<listcell label="Philip Hensher" />
					<listcell label="The Northern Clemency" />
					<listcell label="Knopf (October 30, 2008)" />
					<listcell label="608 pages" />
					<listcell label="Philip Hensher" />
					<listcell label="The Fit" />
					<listcell label="HarperPerennial (April 4, 2005)" />
					<listcell label="240 pages" />
					<listcell label="Philip Hensher" />
					<listcell label="Kitchen Venom" />
					<listcell label="Flamingo (May 19, 2003)" />
					<listcell label="336 pages" />

			<include src="detail.zul" id="detailPanel" vflex="true" widht="50%"/>


detail zul

	String x = (String) desktopScope.get("key");
	System.out.println("detail " + x);
<label  value="area below this message should be udpated as soon as page loads. same as clicking on listitem ">


	<label  value="${x}" style="align: left;">



seems a bug in 5.0.6. please help anyone have any idea about it


link publish delete flag offensive edit

answered 2011-05-22 04:59:27 +0800

matthewgo gravatar image matthewgo

It seems like a bug
plz follow this thread

you can try the workaround:

        <hbox id="hbox">
	Include include = new Include();

link publish delete flag offensive edit

answered 2011-05-23 05:46:49 +0800

abhi21284 gravatar image abhi21284

Hi Mathew,

Thanks for your help. I tried your workaround and worked for me.
FYI: I also tried 5.0.7 but seems bug is still there in newer version.


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




Asked: 2011-03-11 03:29:32 +0800

Seen: 398 times

Last updated: May 23 '11

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