开发者

JSF - <h:outputText> making some of words Bold [duplicate]

开发者 https://www.devze.com 2022-12-23 21:12 出处:网络
This question already has an 开发者_开发知识库answer here: Component to inject and interpret String with HTML code into JSF page
This question already has an 开发者_开发知识库answer here: Component to inject and interpret String with HTML code into JSF page (1 answer) Closed 6 years ago.

How can we go about making some of the words in a sentence appear in BOLD

for example - I'm trying to put one of the words of a sentence in BOLD i.e.

sentence is "please select the amount"

amount should be in BOLD, and now, when I use

message = "please select the <b>amount </b>" 

This doesn't work. It simply shows

please select the <b>amount </b>.

How can I get this to work?


Setting the escape attribute to false allows you to insert html tags

<h:outputText escape="false" value="please select the <b>amount</b>"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号