0

unescape data in listcell [closed]

asked 2018-01-10 20:28:11 +0800

dparisi gravatar image dparisi
6

Hi at all. I try to format (with a carriage return) a data in a listcell with a code like this:

<listcell label="@load(each.data1)" style="text-align:left"/>

in the bind model data1 is a string like this: "first line
second line
third line"

But all ways i try the
is escaped, i have also tryed with "/n" but nothing.

Anyone know if there is a way to send a carriage return in a listcell value/label? Thanks at all.

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by cor3000
close date 2018-01-12 09:38:08

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-01-11 11:29:56 +0800

hawk gravatar image hawk
2225 1 5
http://hawkphoenix.blogsp... ZK Team

Label multiline attribute can help you.

For example:

<zk>
<zscript><![CDATA[
String multiLines = "1st line \n 2nd line \n 3rd line";
]]></zscript>
<div apply="org.zkoss.bind.BindComposer">
    <label value="@load(multiLines)"/>
    <label multiline="true" value="@load(multiLines)"/>
    <listbox>
        <listhead>
            <listheader label="name"/>
        </listhead>
        <listitem>
            <listcell>
                <label multiline="true" value="@load(multiLines)"/>
            </listcell>
        </listitem>
    </listbox>
</div>
</zk>
link publish delete flag offensive edit
0

answered 2018-01-11 16:18:52 +0800

dparisi gravatar image dparisi
6

Great!...it works, thank you very much hawk. I cannot upvote but your solution is ok.

Thanks again at all. Regards

link publish delete flag offensive edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2018-01-10 20:28:11 +0800

Seen: 12 times

Last updated: Jan 11

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