【发布时间】:2018-01-18 02:18:11
【问题描述】:
我想将<wbr> 添加到<h:link> 的值属性中。所以我写了这个:
<h:link value="THIS-IS-LONG<wbr>-WORD" outcome="word"></h:link>
我想创建这个 html:
<a href="/demo/word.xhtml">THIS-IS-LONG<wbr>-WORD</a>
但我收到了这个错误:
HTTP Status 500 - Error Parsing /index.xhtml: Error Traced[line: 330] The value of attribute "value" associated with an element type "h:link" must not contain the '<' character.
我怎样才能增加价值?
我正在使用
Server version Apache Tomcat/8.0.27
OS Name Linux-4.12.3-1-MANJARO
JVM Version 1.8.0_121-b13
Mojarra 2.2.12
【问题讨论】:
-
搜索互联网并在您的查询中使用“转义”一词(“xhtml 转义小于”(wbr,您可以说它在使用
<p>时有效 -
@Kukeltje 感谢您的评论。我想你的意思是<wbr>。我试过了,生成的链接文本类似于 THIS-IS-LONG
-WORD。我的意思是 变成文本而不是标签。我想将 添加为标签。 -
不,我不是那个意思……我是这个意思stackoverflow.com/questions/14374758/…