我想在此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}
,但它会生成错误
答案 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>