提问人:emotionalDamage 提问时间:1/24/2023 更新时间:1/30/2023 访问量:173
Java Zkoss 前端框架 - 属性标签中的换行符
Java Zkoss Frontend Framework - Break line in property label
问:
我投入了太多时间,现在我想问你如何在 .properties 文件属性值的特定位置插入换行符。例如,我有:
ZUL:
<zk xmlns:h="native" xmlns:x="xhtml">
<groupbox width="850px">
<caption label="${c:l('not this label')}" />
<h:table >
<h:tr>
<h:td>
<h:label>${c:l('mylabel.linebreakedlabel')}</h:label>
</h:td>
....
.properties 文件:
mylabel.linebreakedlabel = Hello this label should be breaked into two lines
我尝试了许多不同的解决方案:
一个:
Hello this label should be \ breaked
into two lines
-> second line in label gets thrown away
B:
{
Hello
second line
}
-> The {} gets rendered and second line is thrown away
C:
\n with and without enter either renders the sign or throws away the whole second line
D:
Tried </br>, the element itself gets rendered
我在这个平台上询问,因为 ZK 论坛不会给我发送电子邮件来确认我的注册。 有人知道问题所在,或者至少知道问题出在哪里吗?(使用 ZK 版本 6)
谢谢!
答:
1赞
Hawk
1/30/2023
#1
请阅读 Specify a Value with Multiple Lines, its code example, and properties file example 。
评论
0赞
emotionalDamage
1/30/2023
我已经通读了它并测试了它(见上文)。但是现在我想知道:multilines={ line 1 line 2 } 现在我想知道,我是否必须在我想要的实际内容之前写下“行”?可能就是这样
1赞
Hawk
1/31/2023
我昨天用清晰的例子更新了页面。请再读一遍:)
1赞
Hawk
1/31/2023
如果您在属性文件中写入 {line1 line2},请输入该值以将其呈现为多行。<label multiline="true" />
评论