unescape data in listcell [closed]

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

dparisi gravatar image dparisi

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

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

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

Label multiline attribute can help you.

For example:

String multiLines = "1st line \n 2nd line \n 3rd line";
<div apply="org.zkoss.bind.BindComposer">
    <label value="@load(multiLines)"/>
    <label multiline="true" value="@load(multiLines)"/>
            <listheader label="name"/>
                <label multiline="true" value="@load(multiLines)"/>
link publish delete flag offensive edit

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

dparisi gravatar image dparisi

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

1 follower



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

Seen: 12 times

Last updated: Jan 11 '18

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