在EL中的字符串中使用单引号

时间:2015-06-26 14:11:54

标签: jsf

我需要在JSF代码上编写这个字符串:

rendered="#{person.value.equals('it's him')}"

我的问题在于'字符。

感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

您可以执行以下操作:

<h:outputText value="My text with \'single quotes\' and \"double quotes\"" />

所以:

rendered="#{person.value.equals('it\'s him')}"

看看这个:

<af:outputText inlineStyle="font-weight:bold;" value="#{viewControllerBundle.BEAN_ONLINE_VARIABLE_PASS_1}" id="ot22p_" rendered="#{empty pageFlowScope.sensor.payed and pageFlowScope.sensor.down eq 'false'}"/>
相关问题