将标记插入h:outputText以增强某些单词jsf

时间:2012-09-04 17:38:26

标签: css jsf-2

我想在此outputText的值中插入<span>

<h:outputText id="jesuis1" value="la quantité nécéssaire : #{editCommandController.myCom.nbreExemplaire*editCommandController.myCom.nbrePage}" />

我的目标是通过css增强此{editCommandController.myCom.nbreExemplaire*editCommandController.myCom.nbrePage},但它会生成错误

你知道吗

1 个答案:

答案 0 :(得分:0)

您需要escape属性!

<h:outputText escape="false" value="#any text including el that evaluates to html tags"/>

或者您可以使用

<h:outputFormat escape="true" value="text with {0} tags>
    <f:param value="#{bean.htmlExpression}" />
</h:outputFormat>