0

Zul code works. But, the same in zscript doesn't.

asked 2009-10-31 02:24:31 +0800

baskaraninfo gravatar image baskaraninfo
526 2 2 9

updated 2009-10-31 02:42:49 +0800

I have designed a multi-line listbox header in zul and it works perfectly. But, I have followed the same in zscript and it doesn't works.

I have followed this thread.

Zul test code which works:

<?page title="Multiline List Header" contentType="text/html;charset=UTF-8"?>
<zk>
	<window title="Multiline List Header" border="normal">
		<listbox id="listBox">
			<listhead>
				<listheader sort="auto">
					<label value="first&'#'10;&'#'13;column"
						multiline="true">
					</label>
				</listheader>
				<listheader sort="auto">
					<label value="second&'#'10;&'#'13;column"
						multiline="true">
					</label>
				</listheader>
			</listhead>
			<listitem>
				<listcell label="" />
				<listcell label="" />
			</listitem>
			<listitem>
				<listcell label="" />
				<listcell label="" />
			</listitem>
		</listbox>
	</window>
</zk>

Zscript test code which doesn't works:

<?page title="Multiline List Header" contentType="text/html;charset=UTF-8"?>
<zk>
	<window title="Multiline List Header" border="normal">
		<listbox id="listBox">
			<listitem>
				<listcell label="" />
				<listcell label="" />
			</listitem>
			<listitem>
				<listcell label="" />
				<listcell label="" />
			</listitem>
		</listbox>
		<zscript><![CDATA[
		                  Listhead listHead = new Listhead();
		                  Listheader listHeader = new Listheader();
		                  listHeader.setSort("auto");
		                  Label label = new Label();
		                  label.setValue("first&'#'10;&'#'13;column");
		                  label.setMultiline(true);
		                  listHeader.appendChild(label);
		                  listHead.appendChild(listHeader);
		                  listHeader = new Listheader();
		                  listHeader.setSort("auto");
		                  label = new Label();
		                  label.setValue("second&'#'10;&'#'13;column");
		                  label.setMultiline(true);
		                  listHeader.appendChild(label);
		                  listHead.appendChild(listHeader);
		              listBox.appendChild(listHead);
]]></zscript>
	</window>
</zk>

I want to set the listbox multiline header using java. Can anybody have any suggestion/work around?

Thanks.

Note:
it uses the html-wordwrap &'#'10;&'#'13;.
The quotes '' must be deleted. Or replace the '#' with #.
It's only that it can be showed here.

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-10-31 04:04:35 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

you should use pure java new line.

label.setValue("first\ncolumn");

link publish delete flag offensive edit

answered 2009-10-31 05:29:22 +0800

baskaraninfo gravatar image baskaraninfo
526 2 2 9

Thank you, dennis :)

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: 2009-10-31 02:24:31 +0800

Seen: 812 times

Last updated: Oct 31 '09

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